Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Re: XML-related Regular Expressions

by extremely (Priest)
on Jun 12, 2001 at 07:26 UTC ( #87715=note: print w/replies, xml ) Need Help??

in reply to XML-related Regular Expressions

No offense but I think I went blind looking at your code. =) =)

My way looks longer but is ever so much more readable:

# just the CombiningChar one for an example # # And yes that is an evil thing to do to a heredoc... # (my $XML_CombiningChar = <<XMLCC) =~s/\s//gs; \x{300}-\x{345} \x{360}-\x{361} \x{483}-\x{486} \x{591}-\x{5A1} \x{5A3}-\x{5B9} \x{5BB}-\x{5BD} \x{5BF} \x{5C1}-\x{5C2} \x{5C4} \x{64B}-\x{652} \x{670} \x{6D6}-\x{6DC} \x{6DD}-\x{6DF} \x{6E0}-\x{6E4} \x{6E7}-\x{6E8} \x{6EA}-\x{6ED} \x{901}-\x{903} \x{93C} \x{93E}-\x{94C} \x{94D} \x{951}-\x{954} \x{962}-\x{963} \x{981}-\x{983} \x{9BC} \x{9BE} \x{9BF} \x{9C0}-\x{9C4} \x{9C7}-\x{9C8} \x{9CB}-\x{9CD} \x{9D7} \x{9E2}-\x{9E3} \x{A02} \x{A3C} \x{A3E} \x{A3F} \x{A40}-\x{A42} \x{A47}-\x{A48} \x{A4B}-\x{A4D} \x{A70}-\x{A71} \x{A81}-\x{A83} \x{ABC} \x{ABE}-\x{AC5} \x{AC7}-\x{AC9} \x{ACB}-\x{ACD} \x{B01}-\x{B03} \x{B3C} \x{B3E}-\x{B43} \x{B47}-\x{B48} \x{B4B}-\x{B4D} \x{B56}-\x{B57} \x{B82}-\x{B83} \x{BBE}-\x{BC2} \x{BC6}-\x{BC8} \x{BCA}-\x{BCD} \x{BD7} \x{C01}-\x{C03} \x{C3E}-\x{C44} \x{C46}-\x{C48} \x{C4A}-\x{C4D} \x{C55}-\x{C56} \x{C82}-\x{C83} \x{CBE}-\x{CC4} \x{CC6}-\x{CC8} \x{CCA}-\x{CCD} \x{CD5}-\x{CD6} \x{D02}-\x{D03} \x{D3E}-\x{D43} \x{D46}-\x{D48} \x{D4A}-\x{D4D} \x{D57} \x{E31} \x{E34}-\x{E3A} \x{E47}-\x{E4E} \x{EB1} \x{EB4}-\x{EB9} \x{EBB}-\x{EBC} \x{EC8}-\x{ECD} \x{F18}-\x{F19} \x{F35} \x{F37} \x{F39} \x{F3E} \x{F3F} \x{F71}-\x{F84} \x{F86}-\x{F8B} \x{F90}-\x{F95} \x{F97} \x{F99}-\x{FAD} \x{FB1}-\x{FB7} \x{FB9} \x{20D0}-\x{20DC} \x{20E1} \x{302A}-\x{302F} \x{3099} \x{309A} XMLCC print "$XML_CombiningChar\n"; $XML_CombiningChar = qr/[$XML_CombiningChar]/; print "$XML_CombiningChar\n";

$you = new YOU;
honk() if $you->love(perl)

Replies are listed 'Best First'.
Re: XML-related Regular Expressions
by John M. Dlugosz (Monsignor) on Jun 12, 2001 at 19:59 UTC
    $XML_CombiningChar = qr/[$XML_CombiningChar]/;
    Nice! Reusing the same variable eliminates the need for another scratch variable in the same scope.


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://87715]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2017-04-25 19:02 GMT
Find Nodes?
    Voting Booth?
    I'm a fool:

    Results (462 votes). Check out past polls.