[Tutor] Regexp Not Matching on Numbers?

Max Noel maxnoel_fr at yahoo.fr
Tue Dec 14 18:42:17 CET 2004


On Dec 14, 2004, at 18:15, Gooch, John wrote:

> This is weird. I have a script that checks walks through directories, 
> checks
> to see if their name matches a certain format ( regular expression ), 
> and
> then prints out what it finds. However, it refuses to ever match on 
> numbers
> unless the regexp is ".*". So far I have tried the following regular
> expressions:
> "\d+"
> "\d*"
> "\W+"
> "\W*"
> "[1-9]+"
> and more...

	I think you have to escape the backslashes.

-- Max
maxnoel_fr at yahoo dot fr -- ICQ #85274019
"Look at you hacker... A pathetic creature of meat and bone, panting 
and sweating as you run through my corridors... How can you challenge a 
perfect, immortal machine?"



More information about the Tutor mailing list