in reply to Re^4: extracting a substring from a string - multiple variables
in thread extracting a substring from a string - multiple variables
in my case I'm handling POSTed data, where $length is declared in the data, and $binary just sits between the <file/> tags.
If thats so you *definitely* can't use any approach other than blindly extracting a byte sequence of given length (as in Example 2) because the data *might* at some point contain the sequence \x00€µ</file>³á>>~ which would break your program otherwise (if you'd use the regex like ... =~m{<file>.*?</file>} ...).
Regards
mwa
|
|---|