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

that's what I also dont get it,am just racking my brain from morning,is there a way I can attach a text doc?

Replies are listed 'Best First'.
Re^3: Regex not matching
by ikegami (Patriarch) on Jan 29, 2011 at 04:38 UTC

    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.)

      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+$/).
Re^3: Regex not matching
by perl_mystery (Beadle) on Jan 29, 2011 at 04:34 UTC

    I dont think I can attach a text doc,but I modified the input to exactly what I have?can you spot a difference which I cant?

      There's definitely a character after the number. A space (unless it's getting corrupted into a space).