Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^3: Pattern match not working sometimes

by GrandFather (Saint)
on Mar 18, 2012 at 21:42 UTC ( [id://960331]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Pattern match not working sometimes
in thread Pattern match not working sometimes

The issue is the ^ anchor and the character causing grief is a new line at the start of the line! If you change your match to /(\C\C\C\C)(.*)/s the problem is fixed. Note that there is no need for anchors in any case - you want the first four octets followed by anything so that will always match at the start of the string (unless there are fewer than 4 octets).

True laziness is hard work

Replies are listed 'Best First'.
Re^4: Pattern match not working sometimes
by dantheman1210 (Beadle) on Mar 18, 2012 at 23:31 UTC
    That worked!!! I never thought about the data itself causing the issue since I was working with binary data, just thought if it as 0's and 1's, not the characters that they could be associated with. Thanks again, you saved me from having to basically start over with the design.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://960331]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2024-04-19 04:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found