lhoward has defined a set, as indicated by the [ ]. When perl's regex engine sees this, anything within the brackets will be considered a match. However, lhoward was tricky and made the first character a ^. When the first character of set is a ^, it negates the set ( mathematicians call it the complement, but I can't spell 'complement' ) and tells the regex to match everything but what is in the set.
is saying to match anything that isn't a < or a >[^<>]
HTH,
mikfire
In reply to RE: RE: RE: Re: Regex grabs too much
by mikfire
in thread Regex grabs too much
by raflach
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |