I'm trying with grep to find Twig variables that do not respect naming conventions, excluding object properties. So I would like to match camelCase words, that doesn't start by "."
does.notMatch
doesMatch
some words doesMatch
I've tried this :
^\w [A-Z]\w
But it matches only with full lines.
CodePudding user response:
I don't know what you want.
But it will work /(\s|^)(?<!(\.))([a-z] [A-Z][a-z] )/g
according to your description