Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

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

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


in reply to How do I split on ',' followed by a capital letter?

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
Node Status?
node history
Node Type: note [id://37668]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2021-04-19 22:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?