in reply to Match and extract three characters from the middle of a string

Hi, You can also use substr to extract a part of the stirng.

$inq="23D78000";
print substr($inq,2,3);

prints the output you need. substr can be used to extract parts of variable. It takes 3 parameters. First is the variable you need to work on, second is the number of characters that needs to be stripped out from left and third is the number of characters that needs to be retained in the string. Hope this helps!!! For further information, see manpage for substr()