xcode - Got Error 'repetition-operator operand invalid' with negative look behind regex (?<!(Log\())@"[^"]+" -


i want find hardcoded strings in project except words starts log(.

using regex getting error mentioned above.

keywords='(?<!(log\())@"[^"]+"'  find "${srcroot}" \( -name "*.h" -or -name "*.m" \) -print0 | xargs -0 egrep --with-filename "($keywords).*\$ 

is there other alternative regex or script same result.

you might filter out don't want see:

xargs -0 grep -eh '@"[^"]+"' | grep -v 'log\(@"' 

if want stick regular expression:

xargs -0 perl -ne 'print "$argv: $_" if /(?<!log\()@".+?"/' 

Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

how to prompt save As Box in Excel Interlop c# MVC 4 -

xslt 1.0 - How to access or retrieve mets content of an item from another item? -