<cfscript>
stTmp =
REFind("[*]{3}([^*]+)([0-9]{1,2}/[0-9]{1,2}/[0-9]{4})[[:space:]]+([0-9]{
1,2}:[0-9]{1,2}:[0-9]{1,2})([^*]+)[*]{3}",str,1,true);
user1 = Mid(str,stTmp.pos[2],stTmp.len[2]);
date = Mid(str,stTmp.pos[3],stTmp.len[3]);
time = Mid(str,stTmp.pos[4],stTmp.len[4]);
user2 = Mid(str,stTmp.pos[5],stTmp.len[5]);
if(len(trim(user1))) user = trim(user1);
else if(len(trim(user2))) user = trim(user2);
else user = "";
</cfscript>
<span class="timestamp">#user# #date# #time#</span>

It's not full proof, but it should work.

> -----Original Message-----
> From: cf coder [mailto:[EMAIL PROTECTED]
> Sent: maandag 17 mei 2004 13:11
> To: CF-Talk
> Subject: Re: help with string manipulation (Find,Replace)
>
> sorry for being such a pest... I forgot to add in my earlier
> post that the timestamp for all existing comments is in the format:
>
>  *** 10/28/2003 2:53:52 User1 ***
>
> and the timestamp for new comments is:
>
>  *** User1 10/28/2003 2:53:52 ***
>
> Can you also show me how to display all existing timestamps
> in the above format
>
> Many many thanks in advance.
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to