[Tutor] stopping greedy matches

Christopher Weimann cweimann at k12hq.com
Fri Mar 18 18:27:35 CET 2005


On 03/17/2005-10:15AM, Mike Hall wrote:
> 
> <applause> Very nice sir. I'm interested in what you're doing here with 
> the caret metacharacter. For one thing, why enclose it and the 
> whitespace flag within a character class? 

A caret as the first charachter in a class is a negation.
So this [^\s]+ means match one or more of any char that
isn't whitespace.  

> Does this not traditionally 
> mean you want to strip a metacharacter of it's special meaning?
> 

That would be \


More information about the Tutor mailing list