in reply to Fetching a number

Anonymous Monk,
From what you have shown - it is a fixed string up to the number you are looking for. This screams "use substr". Your example showed \d{3} which implies it will always be a 3 digit number, but since you didn't say that - I offer the following two solutions - neither using a regex.
#!/usr/bin/perl -w use strict; my $string = qq{('AA','B','2','ProjectId','148')">Unique Information H +ere (Index)}; my $number = substr($string,27,3); #my $number = substr($string,27,index($string,"'",27) - 27); print "$number\n";
Just switch the comments for my $number depending on if it will always be a 3 digit number or not.

Cheers - L~R