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

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -