|
Carlos | Posted at 7:27am on Monday, August 27th, 2007 |
Very usefull |
Carlos | Posted at 7:31am on Monday, August 27th, 2007 |
Why this regex "^-\(w+)" does not retreive enything from here "-lolo",
Thank you very much |
Perlfect | Posted at 7:35am on Monday, August 27th, 2007 |
Carlos, the backslash should be before the "w+", not the parenthesis. Your regex should read "^-(\w+)", without the quotes. |
Eddie | Posted at 12:51pm on Tuesday, September 11th, 2007 |
I put (/w+) in your tutorial running on \fredupperlower/clipped/file.txt and it matches /clipped, which I want it to. But in my script, it's not working. The sequence is:
$dir = $File::Find::dir;
$dir =~ /(/w+)/;
$dirname = $1;
print "directory name: $dirnamen"; |
Eddie | Posted at 1:16pm on Tuesday, September 11th, 2007 |
I tried using:
$dir =~ m!/(w+)!;
and that seemed to work (better than I expected, since it returns "clipped" instead of "/clipped" which is easier to work with for my purposes). |
Agus | Posted at 10:19am on Thursday, September 13th, 2007 |
I need your, how to validate phone number. eg: (021)087655 or 021-56745.
thanks |
Sleve | Posted at 6:53pm on Monday, September 24th, 2007 |
Agus: (d{3})d{6} or
d{3}-d{5}
I forget how to make it so that "either" will grab the line.
(((d{3})d{6})|(d{3}-d{5})) should have done it, I think, but it failed to catch the second one in capture groups. |
Sleve | Posted at 6:56pm on Monday, September 24th, 2007 |
Agus: I put it in correctly, but the comment engine stripped out some back slashes. There should be a backslash before each parenthesis in the first one listed. |
Kokok | Posted at 12:30am on Thursday, January 10th, 2008 |
This page is great to test my regex |
Comments to date: 9.