Firstly (and briefly) to Turtle...
Quote:
Originally Posted by Turtle91
The Regex examples thread is definitely helpful!
|
What's the "Regex examples thread"? I did a search of the forums here for "regex examples" but didn't find anything.
Also, from Jellby...
Quote:
Originally Posted by Jellby
For the record:
. : any character
+ : any number of times (but at least one)
? : but as few as as possible, as long as the rest of the expression still matches
( ) : and put it in a group, so it can be referred to as \1, \2, etc.
|
Oh, cool, thanks for breaking that down for me.

I just interpreted the whole shebang together as "variable" -- which I guess is essentially what it means/does.
I'm not quite sure that I understand the "? : but as few as as possible, as long as the rest of the expression still matches" part, though -- in what sense as few as possible? Couldn't it go on (and on and on, ad infinitum) until it hits the next part of the matching string -- wouldn't it do that without the "?" in there anyway, just stop at that part (the next matching bit)?
Perhaps I'm overcomplicating this -- the simple answer, for my needs, is that "(.+?)" does the trick!