Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: How to split CamelCase?

by Sidhekin (Priest)
on Sep 18, 2007 at 10:02 UTC ( [id://639600]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $string = "ThisIsACamelCasedString";
    my @split = $string =~ /([A-Z][a-z]*)/g;
    print "Parts: @split";
    
  2. or download this
    my $string = "AStringWithFTPAndHTTP";
    my @split = $string =~ /([A-Z](?:[A-Z]*(?=$|[A-Z][a-z])|[a-z]*))/g;
    print "Parts: @split";
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (2)
As of 2024-04-26 04:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found