in reply to Re: Help with placing the matches of a regex into an Array
in thread Help with placing the matches of a regex into an Array
ahhhh, of course. Thanks JavaFan. In my example above, the /g isn't needed due to the fact I was reading a line at a time, but kept it in as I (correctly) assumed the OP would have multiple links in a scalar glob. Since I didn't test it as such though, I missed this bug.
I'm far from an expert in regexes, so I'm wondering if using the non-greedy operator essentially does the same thing in this case... or is there possibly something else I am missing that you see?
/onclick="document\.location\.href='(.+?)'"/g
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Help with placing the matches of a regex into an Array
by JavaFan (Canon) on Apr 28, 2012 at 20:47 UTC | |
by stevieb (Canon) on Apr 28, 2012 at 20:57 UTC |