Hi all,
I'm going down the road of learing the pattern matching in regular
expressions, and I'm trying to convert the characters into English in my
head so I can see whats happening...
For clarity with this one...
\[b\]([^\]]+)\[\/b\]
Ok - the first thing I did was break it up - because it looks a nightmare
like that...so now I have..3 parts..
\[b\]
([^\]]+)
\[\/b\]
In part 1 I under stand that the \ is telling the expression that a special
character is coming next, thus escaping the [ and ] respectively, thus ,
and in part 3 I understand the same and also the escaping of the /, thus
- no problems so far...
In part 2 I'm assuming that the brackets are seperating a "pattern" so that
I might reference it as $1 later on, I understand that the [^] are saying
"not enclosed" so therefore it's going to ignore a ], the + sign however
perplexes me - my VBScript book says "Matches the preceeding character one
or more times" - so does that mean the ] just before it, or does it mean the
character OR characters defined within the [ ] etc?
Any help would be appreciated - thus far I've managed to 'wing' my way
through what I've needed to do - but it's getting more complicated now :)
Thanks in advance
Rob