I'm using the RegexBuddy utility, with the regex
^\s*for\s.*:(?!:).*$
Which I would paraphrase as 'search lines with optional leading white-space, the text 'for', a single white space, then the rest of the line containing a colon, but not two colons together'.
Which mostly works, but the two colon exclusion doesn't (they are typically iterator references).
What's the correct regex for this search? Thanks!
Aucun commentaire:
Enregistrer un commentaire