in reply to Re^2: Regex not matching
in thread Regex not matching

No.

If you have od, you could dump your file using

od -c file

Or you could use Perl.

perl -ple's/\\/\\\\/g; s/([^\x21-\x7E])/sprintf(qq{\\x{%X}}, ord($1))/ +eg;' file

(Switch «'» for «"» for the Windows shell.)

Replies are listed 'Best First'.
Re^4: Regex not matching
by perl_mystery (Beadle) on Jan 29, 2011 at 04:46 UTC

    the reason seems to there is an extra space after the number ,if I remove that extra space it seems to match,not sure why would "an extra space"after the number make a difference

      It makes a difference because your pattern explicitly requires that the end of the line follows the number (/\d+$/).

        Ya,figured that out