Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Re^3: Splitting on non-initial uppercase without split

by si_lence (Deacon)
on Jan 26, 2005 at 12:38 UTC ( #425186=note: print w/replies, xml ) Need Help??

in reply to Re^2: Splitting on non-initial uppercase without split
in thread Splitting on non-initial uppercase without split

I guess you would want to make your regex case sensitive:
$s =~ s/([a-z])([A-Z])/$1 $2/g;

But then I think it still would not fit the description as it
woud not split something like "Test1Test2" into "Test1 Test2"
So following your line of thought it should be something like
$s =~ s/([^A-Z])([A-Z])/$1 $2/g;


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://425186]
[choroba]: I don't even remember the beginning
[choroba]: someone told me to use perl instead of sed for something, and several years later, I'm developing a huge Tk application
[Discipulus]: choroba started in primary school to get some advantage in the future..
[choroba]: nono, I programmed in Basic at the primary school, on my Commodore 116/16
[Discipulus]: ;=)

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (11)
As of 2018-06-22 09:33 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (123 votes). Check out past polls.