split/Perl question

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: der.hans
Date:  
Subject: split/Perl question
Am 11. Nov, 2002 schw=E4tzte Mike Starke so:

> Here is a sample, however, since these values are obtained from a web for=

m
> (and I can not change the delimeter), there is no telling which field may
> contain the same value as the delimeter. However, there is a fixed amount
> of fields.
>
> :mikest::Mike:Starke::::::::::Phoen=

ix:Arizona:85050:::::::::::::com576:1/31/2001::602.992.xxx:999 Hurten Way::=
:http://www.megconsult.com:0

Which, if any of these colons belongs to the data? Just "http://"?

s/http:/http\:/g

That'll escape the colons in URLs. Don't forget https:, ftp:, etc. if
they're possibilities.

Now split on unescaped colons. Might be easier to change "http://" to
"http;//", then change it back.

ciao,

der.hans
--=20
#  https://www.LuftHans.com/    http://www.TOLISGroup.com/
#  Freedom isn't everything, but without freedom you have nothing. - der.ha=
ns