Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: unpacking mixed ascii & utf16 null termed strings

by patcat88 (Deacon)
on Oct 05, 2011 at 08:46 UTC ( #929738=note: print w/replies, xml ) Need Help??


in reply to Re: unpacking mixed ascii & utf16 null termed strings
in thread unpacking mixed ascii & utf16 null termed strings

Your regexp seems to work. It also deals correctly with the problem of matching 2nd byte (a \0) of hypothetical 1st char (a "p\0" or "\x70\0" lets say) and 1st byte of 2nd char (a \0) that is a utf 16 null (a \0\0), rather than byte 1 (\0) and byte 2 (\0) of utf16 null. I didnt think of doing your group and multiplier to do the alignment on the utf16 strings in a regexp. Thanks.
  • Comment on Re^2: unpacking mixed ascii & utf16 null termed strings

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://929738]
help
Chatterbox?
[shmem]: but that would mean, also, to drop the "use" not allowed in expression abomination, and make use actually return something useful (as does require at the first call, accidentally)

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (13)
As of 2017-11-21 17:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (306 votes). Check out past polls.

    Notices?