If it were me, all of those fields would be in separate fields in the database.
Then there would be no need to do what you are doing.
However, it that's not an option, change the way you are posting the data so it's a list, and parse it out that way, using a delimiter like chr(128) or something else as innocuous. Then, pulling it apart is simply a retrieval of a particular list item.
So for example, if you used the pipe symbol ("|"):
User1|10/28/2003|2:53:52|THIS IS A TEST
Now it's as simple as
<cfscript>
un = listGetAt( query.column, 1, "|");
dt = listGetAt( query.column, 2, "|");
tm = listGetAt( query.column, 3, "|");
cm = listGetAt( query.column, 4, "|");
</cfscript>
<cfoutput>
<span class="time">#un# | #dt# #tm#</span>
#cm#
</cfoutput>
As far as regex, the problem is the username. eg is it always one word, or is it possible to have one with spaces in it? If your example is correct, I would say that a regex solution won't work either.
Show us some actual data.
Thanks,
Robert
>Hello Everybody,
>I've tried hard to find a solution to my problem but
>have had no luck.
>
>I am pulling the data from the 'comments' column in a
>database table. The data in the comments column looks
>like this.
>
>*** User1 10/28/2003 2:53:52 ***
>
>THIS IS A TEST
>
>*** User 2 04/06/2003 13:41:47 ***
>
>blah, blah
>
>I want to read everything that's between the *** ie
>*** User 1 10/28/2003 2:53:52 ***
>and display it like this:
><span class="time">User 1 | 14/4/2004 15:58:15</span>
>THIS IS A TEST
>
>Can somebody please show me how to do this using
>regular expressions?
>Many thanks
>cf coder
>
>
>
>
>__________________________________
>Do you Yahoo!?
>SBC Yahoo! - Internet access at a great low price.
>http://promo.yahoo.com/sbc/
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

