Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^2: expand unicode property (eg \p{Print}) to regex character class range

by Anonymous Monk
on Aug 07, 2010 at 23:56 UTC ( [id://853606]=note: print w/replies, xml ) Need Help??


in reply to Re: expand unicode property (eg \p{Print}) to regex character class range
in thread expand unicode property (eg \p{Print}) to regex character class range

See what ikegami said. Usage of program is
perl fileyousaveditas.pl Propertyname propertyname propertyname
For example (i'm omitting Print):
$ perl unicode-regex-range.pl PerlSpace Title Bopo Dingbats PerlSpace => [\u0009-\u000A\u000C-\u000D\u0020] Title => [\u01C5\u01C8\u01CB\u01F2\u1F88-\u1F8F\u1F98-\u1F9F\u1FA8-\u1 +FAF\u1FBC\u1FCC\u1FFC] Bopo => [\u3105-\u312D\u31A0-\u31B7] Dingbats => [\u2700-\u27BF]
For a list of properties see perluniprops. This program will work only for \w+ properties, it wont work for compound ones like Script: something or Block: something..

I suppose Unicode::UCD ought to provide this functionality or really javascript ought to provide \p{} and \P{} ...

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://853606]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (6)
As of 2024-03-19 05:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found