![]() |
|
Perl-Sensitive Sunglasses | |
PerlMonks |
Re^5: replace stringby ig (Vicar) |
on May 18, 2009 at 10:37 UTC ( #764626=note: print w/replies, xml ) | Need Help?? |
If you provide sample data you may get more specific guidance. Your description is a bit too vague for anyone to be certain what you have as input and what you want as output. There are many possibilities. In addition to the suggestions already given, you may find perlunifaq and Encode helpful. I suspect you don't need Encode for what you are trying to do, but these will give you terminology and context to help you understand about encodings in general and about perl's internal representation of strings, which may be what you are trying to manipulate. Perl regular expressions support escape sequences that allow you to specify fairly arbitrary values in your string, including Unicode code points.
It may be that all you need to do is specify the correct characters in your RE, using one of the escapes (probably long hex char or named Unicode character, depending on your preference). But it is possible you will have to decode your input first. If you use Devel::Peek's Dump to dump your input data and post that, then you might get more specific advice.
In Section
Seekers of Perl Wisdom
|
|