Finding null character using Regex in Perl -
i want find null characters in array, have. tried displaying ascii value , printed 0 (so confirmed null value). how write regex filter out values.
i wrote :
m/^$/ig which didn't me. know how match null character ?
you can use \x followed hex code of ascii character match ascii character.
e.g. /\x3f/ match "?", /\x46\x4f\x4f/ match "foo".
see here on regexr
so /\x00/ match null character.
Comments
Post a Comment