in reply to Re: Regex to get everything before first /
in thread Regex to get everything before first /
/x modifier added to allow comments and insignificant whitespace (it makes everything prettier).And it's easy to get carry it too far. I find /([^\/]*)/ far superior to your novella.
There's a guide line to not overdo comments. That's, don't do:
That holds for patterns as well.$i++; # Increment $i by one, or to the next "word".
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Regex to get everything before first /
by davido (Cardinal) on Jun 06, 2011 at 20:43 UTC | |
by Anonymous Monk on Nov 11, 2015 at 19:47 UTC | |
|