Well, I found a way to remove the control characters after each line:
perl -p -e "s/\r+//" file.txt > newfile.txt
and I thought for sure, this would work, but I still can't get it to match :-(

I tried every regex possible, but no luck, here's how I'm calling it:
while (<FILE>){ /ATDT\d+\s+BUSY/ ? print : print "Did not match '$_'\n"; #print if /ATDT\d+\s+BUSY/; #print if /ATDT\d+.*BUSY/s; #print; }
L~R,

It looks like they took down the download files for Perl Power Tools.

eXile,

I tried your code, but I'm getting
The system cannot find the file specified.
I don't see where I'm suppose to specify the input file?

Abigail,

Thanks for the suggestion, but as you can see above I tried it, still not working.

Roy,

Everything gets printed back, including the lines I'm trying to match on
Did not match 'Output: Got ."ATDT1234567' ' Did not match 'BUSY

In reply to Re: Regex Help by Dru
in thread Regex Help by Dru

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.