Answer the question
In order to leave comments, you need to log in
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
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 questionAsk a Question
731 491 924 answers to any question