XP is just a number | |
PerlMonks |
Re: Regular expression for chinese characterby John M. Dlugosz (Monsignor) |
on May 19, 2011 at 13:59 UTC ( [id://905702]=note: print w/replies, xml ) | Need Help?? |
First, learn about the "regexp" feature. Perhaps start with perlretut. For example, /\d+/ will match a sequence of digits (0 through 9). Similarly, you can find a sequence of characters that are used in Asian languages, as opposed to ASCII or other Latin, Greek, etc. characters. There are built-in classifications, including "Han", which another poster illustrated. So, use a pattern that finds all occurrences of Han characters within your mixed text.
In Section
Seekers of Perl Wisdom
|
|