On a whim, I decided to sift through all my code and see which modules and pragma's I used/required the most. So I came up with this regex:
m,(use|require)[\s\+]+([\w:]+)\s*[^;]*;,igsBut I can't figure out how to ignore commented lines. I've been trying to figure out negative lookbehinds, cause that seems to be the thing to do.
m,(?<!- )(use|require)[\s\+]+([\w:]+)\s*[^;]*;,igs That's not working for me, though. How would I go about doing this? Already this is by far the toughest regex I've ever had to write..."We're experiencing some Godzilla-related turbulence..."
In reply to Is this the time for a negative lookbehind? by patgas
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |