Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Regex matching

by Ay_Bee (Monk)
on Jul 03, 2002 at 13:23 UTC ( [id://179149]=note: print w/replies, xml ) Need Help??


in reply to Regex matching

I don't know how you wish to use the data but to split out each charac +ter group (Except "UFOFH")into an array try this snippet $_='UFOFH 33603 01231 /0000 0024/ 1024/ 2025/ 3027/ 4030/ 5025/ 6028/ +7060/ 8081/ 9098/ 0110/ 1107/ 2106/ 3102/ 4080/ 5065/ 6057/ <\p>'; my @mailbox=( m#([0-9//]{5})#g); for my $i (0 .. $#mailbox) { print "mailbox[$i] => $mailbox[$i]\n"; }; which results in mailbox[0] => 33603 mailbox[1] => 01231 mailbox[2] => /0000 mailbox[3] => 0024/ mailbox[4] => 1024/ mailbox[5] => 2025/ mailbox[6] => 3027/ mailbox[7] => 4030/ mailbox[8] => 5025/ mailbox[9] => 6028/ mailbox[10] => 7060/ mailbox[11] => 8081/ mailbox[12] => 9098/ mailbox[13] => 0110/ mailbox[14] => 1107/ mailbox[15] => 2106/ mailbox[16] => 3102/ mailbox[17] => 4080/ mailbox[18] => 5065/ mailbox[19] => 6057/
Ay_Bee
-_-_-_-_-_-_-_-_-_-_-_- My memory concerns me - but I forget why !!!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (7)
As of 2024-04-19 10:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found