Not sure why but the behaviour is strange. Whenever I use the \u0000 in the regular expression, it then matches nothing.
var regexpNotWorking:RegExp = new RegExp("[^\u0000-\u0020]");
var regexpWorking:RegExp = new RegExp("[^\u0001-\u0020]");
var input:String = "I should be valid";
trace("not working: " + input.match(regexpNotWorking));
trace("working: " + input.match(regexpWorking));
the output are:
not working: null
working: I
Anyone has idea why \u0001 is working, but \u0000 is not?
How could I make sure the input does not contain \u0000?