Hello. I work in FlashDevelop and in the global search by project (ctrl + shift + f) I write RegExp (in C #, as I understand it), which will find lines containing an expression of the form: quotation mark + RussianBukva * + quotation mark. Simple regular work, but I really want to exclude lines containing the word 'trace' from the selection. In other words, I am looking for a string that does not contain the word trace, but contains one or more Russian letters between the quotes. Immediately it should be said that there can be anything between a trace and a Russian string in quotes, and before the trace there are a lot of tabs. Examples:

trace("Шла"); trace("error:", id, "Саша"); var s:String = "по шоссе"; var a:Array = [123, "и что-то там"]; 

The working construction of the search for Russian lines in the project:

 ".*[А-яЁё].*" 

I would be grateful for the help.

  • Try (?!trace).*[А-яЁё].* - 0xdb
  • @ 0xdb, the result of 627 messages. What is so (?! Trace). * [A-yayo]. *, What's so. * [A-yayo]. * It is on the application?! ,?:, ^ I'm stuck. - Alex Shiganov
  • I took it from the depths of sub-knowledge, I did not check those, there is no possibility on the phone. But somewhere in this direction. Try the 2nd part in the group too. - 0xdb
  • Your regular season does not work for что-то (hyphen). - user239133
  • Watch this . Maybe it will help. PS RegExp are versatile. And you probably write them to Python (raw line) - kitscribe

1 answer 1

Thanks to @Wiktor Stribiżew for the working regular season:

 (?im)^(?!.*\btrace\b).*"[^"\r\n]*[а-яё][^"\r\n]*".* 
  • Where is it easier? - Uladzimir Palekh
  • And what about “These regulars for finding strings, not words \ letters, they are not suitable for replacing! If anyone knows how to write these regulars easier - thanks in advance!” ??? Where is this in your question? What to find? What to replace? - Wiktor Stribiżew
  • @ WiktorStribiżew, this comment was for those who may be using these regulars in their project. It should be noted that the regulars are not ideal and output such lines (because of the dot before the quotes): trace (0.5, "strange"); - Alex Shiganov
  • Yes, do not forget to add to [а-я] - Wiktor Stribiżew