[ale] Regex question

Christopher Fowler cfowler at outpostsentinel.com
Thu Mar 11 23:24:09 EST 2004


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}' 




More information about the Ale mailing list