[Memphis.pm] Regexes, finding a <BR> tag and throwing into arrays.

Alaric Ravenhall alaricravenhall at hotmail.com
Mon Apr 16 23:08:56 CDT 2001


Hi all.
Can anyone tell me of an easy way to take a string of text, parsing by a 
<BR> tag at the end each word, and put it into an array?
I will have something similar to this:

Ravenhall<BR>Nemesis<BR>Thulsa<BR>Imoen<BR>Tweedledum<BR>Tweedledee<BR>

I want to INCLUDE the <BR> tag in the array thusly:


@names = 
{"Ravenhall<BR>","Nemesis<BR>","Thulsa<BR>","Imoen<BR>","Tweedledum<BR>","Tweedledum<BR>"}

Forgive the crappy formatting, I DO use better syntax in my code than in 
email. I am thinking I need to use m// - but prolly use like m# to use 
hashes for delimiters. Anyway, any help you could provide would be .. well.. 
helpful.
Also, it'd be keen to know how to refer to the elements in the array - I'm 
guessing I can do @names[1] type stuff. I really dig the $names = @names to 
count the scalars in the array.
Sorry if my question is simple, I only know how this language works from 
manpages and PODs.
Thanx,
Ravenhall
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

----------------------------------------------------------------------------
To unsubscribe, please send email to majordomo at pm.org
with 'unsubscribe memphis-pm-list' in the body of the message.
----------------------------------------------------------------------------




More information about the Memphis-pm mailing list