Hi All,
As we all know Regular Expressions are very greedy and tries to big as big
as possible.
How do i limit a regular expression for example ion the follwing case
i try to find a specific directory called tmp_* in some paths which are like
this
/dir1/dir2/dir3/tmp_test1/dir4/dir5.../.../...
What are you trying to match? If it's just the dir name then:
/\/(tmp_\w)/ will do it and set $1 to equal your directory name.
~mark.
http://www.workzoo.com/
"Zysman, Roiy" wrote:
> Hi All,
> As we all know Regular Expressions are very greedy and tries to big as big
> as possible.
> How do i l
17, 2002 12:13 PM
To: Zysman, Roiy
Cc: '[EMAIL PROTECTED]'
Subject: Re: limiting a regular expression
What are you trying to match? If it's just the dir name then:
/\/(tmp_\w)/ will do it and set $1 to equal your directory name.
~mark.
http://www.workzoo.com/
"Zysman,
out
m|/(tmp_[^/]+)|;
which says, "match a /, the letters 'tmp_', then some stuff
which isn't a '/'."
> -Original Message-
> From: Mark Maunder [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, March 17, 2002 12:13 PM
> To: Zysman, Roiy
> Cc: