What moritz suggested was stripping any non-whitespace characters. The regex I suggested just removes leading ASCII null characters. For the task at hand that should be completely safe.
I strongly recommend that you learn about Perl regular expressions. See perlretut, perlre and perlreref. A browse around the Tutorials section here is likely to pay off too.
In reply to Re^5: String manipulation
by GrandFather
in thread String manipulation
by bajangerry
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |