K
K
kozura2014-07-29 13:18:54
Qt
kozura, 2014-07-29 13:18:54

How to search and replace Cyrillic strings in a file?

If there is a file containing:
///////////////////////////////
// blah blah
int main() {
/* blah blah * /
foo.setText("Hello world! %d"); // blah
return 0;
}
////////////////////////////////////////////////////////////////////////
How to more competently implement a search for strings like "Hello world! %d" and the like, in order to got:
...
/* blah blah */
foo.setText( strlist.at(0) ); //blah
...
Guided by the rules:
- ignore code comments
- search only for what is in quotes.
- check found for Cyrillic content (probably > 1 character)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Petrikov, 2014-07-29
@kozura

If I understand correctly, what you want is something like this:
Regexp is what is in quotes after -E if you will use it in another language.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question