Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Answer: How do I split on ',' followed by a capital letter?

by japhy (Canon)
on Oct 20, 2000 at 18:15 UTC ( #37668=categorized answer: print w/replies, xml ) Need Help??

Q&A > strings > How do I split on ',' followed by a capital letter? - Answer contributed by japhy

You're on the right track. Use a positive look-ahead in your regex:
@fields = split /, (?=[A-Z])/, $string;

Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and God said, "Let Newton be!"...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (1)
As of 2017-07-27 05:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (403 votes). Check out past polls.