I would like to grep the text start from:
NSLocalizedStringFile(@"
and endWith
")
and I use this to grep:
(NSLocalizedStringFile\(@")()|(\);)
but it seems that my regular expression doesn’t work, wt did I do wrong? Thank you.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The following command seems to do it. I use the -P (perl-style regexp) flag to grep to make it easier to search for a multi-line string, since I wasn’t sure if the start & end strings were expected to appear on the same line.
Here’s the contents of my test file:
Note that (as is typical of regexps), this won’t do any matching of (‘s with )’s.