I have a text source with nulls in it and I need to pull them out along with my regex pattern. Can regex even match a null character?
I only realized I had them w
One issue with matching the null character is that you first need to arrange to have it arrive. Lots of languages use null-terminated strings so your match may not be against the entire input.
As for how to express it in PCRE, \000 works and is not going to get tripped up by anything following it, as would \x{} (but the octal version is in my opinion easier to identify when skimming the regex).
See the PCRE manpages and search for Non-printing characters for the full details of how to specify a null in various different ways.