I need a regexp that can capture the following pattern?
ABCD123451 -
ZXD12ZX -
XBXBX -
I tried the following in my perl script but it is not capturing anything.
Do I need to escape the hyphen in position 15?
Thanks.
ABCD123451 -
ZXD12ZX -
XBXBX -
I tried the following in my perl script but it is not capturing anything.
Code:
if ($line =~ /^\s{4}w{1,10)\s-/)
{
print "$line\n";
}
Do I need to escape the hyphen in position 15?
Thanks.