This worked fine for me in my testing - Note the additional brackets around the regex to allow the result to be pulled from $1. If you are still having problems, post again with a bit more context as to where you are using this regex and someone with more experience than myself may be able to help further.$var = "Sun Apr 1 10:27:03 CDT"; if ($var =~ /(\w{3}\s+\w{3}\s+\d+)/) { print $1."\n"; };
In reply to Re: Re: regex-matching the date
by rob_au
in thread regex-matching the date
by stuffy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |