[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] Regex question
- Subject: [ale] Regex question
- From: cfowler at outpostsentinel.com (Christopher Fowler)
- Date: Thu Mar 11 23:24:09 2004
- In-reply-to: <[email protected]>
- References: <1079063828.9310.19.camel@devel> <[email protected]>
On Thu, Mar 11, 2004 at 11:13:04PM -0500, Mike Murphy wrote:
> unless I'm missing something, something like this:
>
> =~ /(XMI\d\d\d)/ should work. The entire string matched will show up in
> $1 afteward. This presumes that not other characters will show in the
> string.
I must be doing something wrong then, I'm using AWK to validate the regex.
The perl Expect module will actually do the matching based on the regular
expression so I do not think anything that is perl specific will work. That
is why I'm testing with awk
echo XMI | awk '/XMI\d\d\d/ {print $0}'