SPUG: RegEx

Parr, Ryan Ryan.Parr at wwireless.com
Fri Sep 7 14:39:17 CDT 2001


$var = '6-2 Dual Mode Selection';
 
my($chapter,$title) = $var =~ m/(\d+-\d+)\s+([\w\s]+)$/
 
will capture the info... I'm sure there's (another|better) way to do it
though, as this requires definate markers of data all on the same line.
 
-- Ryan

-----Original Message-----
From: Brittingham, John [mailto:john.brittingham at attws.com]
Sent: Friday, September 07, 2001 11:33 AM
To: spug-list at pm.org
Subject: SPUG: RegEx




I am trying to replace a white space that lies between an number and a
capital letter without changing either the number or the letter. I can't
find any examples on this.. Can anyone tell me how to do this?

example: 
6-2 Dual Mode Selection...... separating out Dual Mode Selection from 6-2 

Thanks jb 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.pm.org/archives/spug-list/attachments/20010907/72fd6281/attachment.htm


More information about the spug-list mailing list