You could use this regular expression:

rereplace(file_contents,"([^,]*), (.*)\n(.*)\n[ ](.*)\n","line:\1|\2|\3","ALL)

This will convert the 3 lines into something like this:

line:Abbot|John|[EMAIL PROTECTED]
line:Abrahams|Fred|[EMAIL PROTECTED]
etc

You might have to tweak it a little, but that should get you started.




On 10/21/07, Seamus Campbell <[EMAIL PROTECTED]> wrote:
> Hi, I'm trying to parse this list below and am having problems.
> The list comes to me in this format and I have no control over it. I want to 
> parse it to insert first name, last name, email into a database.
> I'm trying to read the file and cannot work out a way to have 2 line/para 
> breaks as a delimiter.
> Can somebody please help
> Seamus
>
>
> Abbott, John
> E-mail Address(es):
>   [EMAIL PROTECTED]
>
> Abrahams, Fred
> E-mail Address(es):
>   [EMAIL PROTECTED]
>
> Adams, Kerin
> E-mail Address(es):
>   [EMAIL PROTECTED]
>
> Allen, Norman
> E-mail Address(es):
>   [EMAIL PROTECTED]
>
> Allen, Xerxes
> E-mail Address(es):
>   [EMAIL PROTECTED]
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Get involved in the latest ColdFusion discussions, product
development sharing, and articles on the Adobe Labs wiki.
http://labs/adobe.com/wiki/index.php/ColdFusion_8

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:291717
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to