Re: help with string manipulation (Find,Replace)

2004-05-19 Thread Deanna Schneider
- Original Message - From: "Pascal Peters" > > You may want to read a bit about regexp. I heard good things about Ben's > book. I've ordered it myself (to use and recommend in my classes), but > it has a hard time getting to Belgium so I haven't read it yet. There is > also http://www.regu

Re: help with string manipulation (Find,Replace)

2004-05-19 Thread cf coder
thank you once again Pascal, I'll get my head stuck in the CFMX reference guide. [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

RE: help with string manipulation (Find,Replace)

2004-05-19 Thread Pascal Peters
nced Developer Macromedia Certified Instructor LR Technologies Av. E. De Mot, 19 1000 BRUSSELS, BELGIUM > -Original Message- > From: cf coder [mailto:[EMAIL PROTECTED] > Sent: dinsdag 18 mei 2004 14:26 > To: CF-Talk > Subject: Re: help with string manipulation (Find,Repla

Re: help with string manipulation (Find,Replace)

2004-05-18 Thread Jas Panesar
Another way you could look at this is to check for the length of the total characters in the first line.   If it will never be less than 4, then you could wrap it with a conditional statement to check until it finds the first real line that is longer than 4 characters. [Todays Threads] [This Me

Re: help with string manipulation (Find,Replace)

2004-05-18 Thread cf coder
I agree with Pascal, regexps are the most powerfull tools when it comes to parsing, however they are not easy to code. Pascal I was wondering if you could explain what your code is doing: commentRegexp = "[*]{3}\s+(.*?)\s+[*]{3}(.*?)(?=([*]{3}\s+.*?\s+[*]{3})|$)"; timestampRegexp = "\d{1,2}/\d{2}

RE: help with string manipulation (Find,Replace)

2004-05-18 Thread Pascal Peters
> -Original Message- > From: Stephen Moretti [mailto:[EMAIL PROTECTED] > Sent: dinsdag 18 mei 2004 12:38 > To: CF-Talk > Subject: Re: help with string manipulation (Find,Replace) > > You end up with a nice wee query of all the log entries for a Do you mean that qu

Re: help with string manipulation (Find,Replace)

2004-05-18 Thread cf coder
Thanks Pascal, your script works just fine. Thanks again for your help, most appreciated. Best regards, cfcoder [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Re: help with string manipulation (Find,Replace)

2004-05-18 Thread Stephen Moretti
>    thisLogLine = trim(ListGetAt(LogField,i)); Whoops Immediately spotted an error : thisLogLine = trim(ListGetAt(LogField,i,chr(13))); Forgot to put the list delimiter in to get one line out of the comments/LogField. Stephen [Todays Threads] [This Message] [Subscription] [Fast Un

Re: help with string manipulation (Find,Replace)

2004-05-18 Thread Stephen Moretti
cf coder wrote: > Hi Robert, > > apologies for causing any confusion. I was asked to present the data > stored in the database table column in a certain way. Historically > data stored in this column is as under: > > timestamp > comments > > EX: > > *** 05/12/2003 09:52:10 USER1 *** > closing if

RE: help with string manipulation (Find,Replace)

2004-05-18 Thread Pascal Peters
on CF5 breaks if you have * between *** *** The script on CFMX doesn't > -Original Message- > From: cf coder [mailto:[EMAIL PROTECTED] > Sent: maandag 17 mei 2004 17:39 > To: CF-Talk > Subject: Re: help with string manipulation (Find,Replace) > > Thanks Pascal. Sorry a

Re: help with string manipulation (Find,Replace)

2004-05-17 Thread cf coder
Thanks Pascal. Sorry again for any inconvenience caused. Best regards cfcoder >I'm off to home right now, but I'll send you the code in the morning >(for me GMT+2) > >> [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

RE: help with string manipulation (Find,Replace)

2004-05-17 Thread Pascal Peters
I'm off to home right now, but I'll send you the code in the morning (for me GMT+2) > -Original Message- > From: cf coder [mailto:[EMAIL PROTECTED] > Sent: maandag 17 mei 2004 17:15 > To: CF-Talk > Subject: Re: help with string manipulation (Find,Replace) >

Re: help with string manipulation (Find,Replace)

2004-05-17 Thread cf coder
sorry Pascal, my bad. The format is not always the same, there may be few comments in the database without the timestamp. All comments added when I build the functionality will not have the *** user timestamp ***. I have CFMX installed on the server. Best regards, cfcoder >If your format isn't al

Re: help with string manipulation (Find,Replace)

2004-05-17 Thread cf coder
aces, username, 2 spaces, > 3 asterisks, comment, cr/lf, cr/lf > etc... > > -Original Message- > From: cf coder [mailto:[EMAIL PROTECTED] > Sent: Monday, May 17, 2004 8:32 A > To: CF-Talk > Subject: Re: help with string manipulation (Find,Replace) >

RE: help with string manipulation (Find,Replace)

2004-05-17 Thread Pascal Peters
iting CF5 regexp for the moment, but this is easier in CFMX. Pascal > -Original Message- > From: cf coder [mailto:[EMAIL PROTECTED] > Sent: maandag 17 mei 2004 16:55 > To: CF-Talk > Subject: Re: help with string manipulation (Find,Replace) > > You are a GENIUS man

Re: help with string manipulation (Find,Replace)

2004-05-17 Thread cf coder
You are a GENIUS man! That code rocks, I wouldn't know how to do this without your help. You are a star. Just one small problem, the comments column sometimes doesn't store the timestamp. I went through your code. The while condition in the above mentioned situation would be false so the code in th

RE: help with string manipulation (Find,Replace)

2004-05-17 Thread Bartlett, Robert E. USNUNK NAVAIR 1490, 54-L4
r/lf, cr/lf etc... -Original Message- From: cf coder [mailto:[EMAIL PROTECTED] Sent: Monday, May 17, 2004 8:32 A To: CF-Talk Subject: Re: help with string manipulation (Find,Replace) Pascal, sorry again for being such a PEST. I really do apprecaite your help. There can be more than one o

RE: help with string manipulation (Find,Replace)

2004-05-17 Thread Pascal Peters
> [mailto:[EMAIL PROTECTED] > Sent: maandag 17 mei 2004 16:37 > To: CF-Talk > Subject: RE: help with string manipulation (Find,Replace) > > Pascal, > > I may have missed the answer to this question, but is the > content that we are looking at a query record set (multiple

RE: help with string manipulation (Find,Replace)

2004-05-17 Thread Bartlett, Robert E. USNUNK NAVAIR 1490, 54-L4
problem to resolve. Thanks, Robert -Original Message- From: Pascal Peters [mailto:[EMAIL PROTECTED] Sent: Monday, May 17, 2004 10:15 A To: CF-Talk Subject: RE: help with string manipulation (Find,Replace) start = 1; aLog = ArrayNew(1); while(true){ stTmp = REFind("[*]{3}([^*]*[[:

RE: help with string manipulation (Find,Replace)

2004-05-17 Thread Pascal Peters
,Len(str)-start)); } break; } } #aLog[i].user# #aLog[i].date# #aLog[i].time# #aLog[i].text# > -Original Message- > From: cf coder [mailto:[EMAIL PROTECTED] > Sent: maandag 17 mei 2004 14:32 > To: CF-Talk > Subject: Re: help with string manipulation (Find,Replace) > >

Re: help with string manipulation (Find,Replace)

2004-05-17 Thread cf coder
Pascal, sorry again for being such a PEST. I really do apprecaite your help. There can be more than one occurance of the timestamp in the comment column. Ex: *** 05/12/2003  09:52:10  USER1 *** closing if fixed - awaitng response from User2 *** 04/12/2003  18:55:18  USER2 *** Have been there, h

Re: help with string manipulation (Find,Replace)

2004-05-17 Thread cf coder
thanks Pascal! It doesn't quite work how I would like it to. EX: *** 08/12/2003  20:33:31  EDWARI31 *** You code displays the above timestamp like this: 0 8/12/2003 20:33:31   Where as I would like it to be displayed like this: EDWARI31 08/12/2003 20:33:31 I dumped stTmp . This is what it ret

RE: help with string manipulation (Find,Replace)

2004-05-17 Thread Pascal Peters
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 *** >

Re: help with string manipulation (Find,Replace)

2004-05-17 Thread cf coder
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 timestam

Re: help with string manipulation (Find,Replace)

2004-05-17 Thread cf coder
I figured that out.. thanks stTmp = REFind("[*]{3}[[:space:]]+([^*]+)[[:space:]]+[*]{3}",str,1,true); info = Mid(str,stTmp.pos[2],stTmp.len[2]); #info# the above code works however I was wondering if you could do me another favour. At the minute you are searching for the "***". Would it be

Re: help with string manipulation (Find,Replace)

2004-05-17 Thread cf coder
Hey Pascal, hope you're doing well buddy! I'm getting an error. The selected method len was not found. Either there are no methods with the specified method name and argument types, or the method len is overloaded with arguments types that ColdFusion can't decipher reliably. If this is a Java obje

RE: help with string manipulation (Find,Replace)

2004-05-17 Thread Pascal Peters
stTmp = REFind("[*]{3}[[:space:]]+([^*]+)[[:space:]]+[*]{3}",str,1,true); info = Mid(str,stTmp.pos[2],stTmp.len(2); #info# > -Original Message- > From: cf coder [mailto:[EMAIL PROTECTED] > Sent: vrijdag 14 mei 2004 17:07 > To: CF-Talk > Subject: Re: help with

Re: help with string manipulation (Find,Replace)

2004-05-14 Thread cf coder
Pascal or anybody who can help! I'm in a similar problem again and need your help. I'm currently using the code provided by Pascal. The solution to which is mentioned above. I am pulling the data from the 'comments' column in a database table. The data in the comments column looks like this. **

Re: help with string manipulation (Find,Replace)

2004-04-01 Thread cf coder
thanks Pascal that explaination makes perfect sense and I understand it. Thanks again for all your help. Best Regards, cfcoder [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

RE: help with string manipulation (Find,Replace)

2004-04-01 Thread Pascal Peters
alk > Subject: Re: help with string manipulation (Find,Replace) > > Sweet! You are a genius! I can never get my head round > regular expressions. > I don't have a clue what this is actually doing > > regexp = "^\s*([*]{3}.+?[*]{3}.+?)\s*(?:[*]{3}.*)?$"; > str2 =

Re: help with string manipulation (Find,Replace)

2004-04-01 Thread cf coder
Sweet! You are a genius! I can never get my head round regular expressions. I don't have a clue what this is actually doing regexp = "^\s*([*]{3}.+?[*]{3}.+?)\s*(?:[*]{3}.*)?$"; str2 = REReplace(str,regexp,"\1"); Can you kindly explain it to me because I have to explain it to my colleague and not

RE: help with string manipulation (Find,Replace)

2004-03-31 Thread Pascal Peters
6:55 > To: CF-Talk > Subject: Re: help with string manipulation (Find,Replace) > > Hi Pascal, I'm really sorry for not getting back to you > yesterday. I've been asked to work on something else. > > I'm trying to display the comment properly and need your >

Re: help with string manipulation (Find,Replace)

2004-03-31 Thread cf coder
Hi Pascal, I'm really sorry for not getting back to you yesterday. I've been asked to work on something else. I'm trying to display the comment properly and need your help. I want to display the top most comment from the comments table. Here is an example. In the example below there are 2 comments

RE: help with string manipulation (Find,Replace)

2004-03-30 Thread Pascal Peters
: Re: help with string manipulation (Find,Replace) > > can you show me how to do this? > > >This is for display in HTML, not in a textarea. The tags > would show > >and everything would be on one line > > > >> > > [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Re: help with string manipulation (Find,Replace)

2004-03-30 Thread cf coder
can you show me how to do this? >This is for display in HTML, not in a textarea. The tags would show >and everything would be on one line > >> [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

RE: help with string manipulation (Find,Replace)

2004-03-30 Thread Pascal Peters
This is for display in HTML, not in a textarea. The tags would show and everything would be on one line > -Original Message- > From: Tangorre, Michael [mailto:[EMAIL PROTECTED] > Sent: dinsdag 30 maart 2004 14:22 > To: CF-Talk > Subject: RE: help with string manipulatio

RE: help with string manipulation (Find,Replace)

2004-03-30 Thread Pascal Peters
laces &,<,>," and use that instead (be sure to replace & first). 2. There is no LF (chr(10)) in your code and that is why it doesn't show. THT Pascal > -Original Message- > From: cf coder [mailto:[EMAIL PROTECTED] > Sent: dinsdag 30 maart 2004 12:48 > To

RE: help with string manipulation (Find,Replace)

2004-03-30 Thread Tangorre, Michael
#ParagraphFormat(variable)# Mike > I need your help with something else. This is not related to > my original query, but related. When the comment field data > is displayed in a text area, it looses the new line > character. Don't know why. Here is an example. [Todays Threads] [This Message

Re: help with string manipulation (Find,Replace)

2004-03-30 Thread cf coder
Thank you pascal, the code works just the way I want it to. here it is:                   #str#        #trim(Left(tmp,Find('#Chr(13)#',tmp)))#       #tmp#    I need your help with something else. This is not related to my original query, but related. When the comment field data is displayed

RE: help with string manipulation (Find,Replace)

2004-03-29 Thread Pascal Peters
unning at the moment Pascal > -Original Message- > From: cf coder [mailto:[EMAIL PROTECTED] > Sent: maandag 29 maart 2004 13:57 > To: CF-Talk > Subject: Re: help with string manipulation (Find,Replace) > > Many Thanks Yalta for your help. Your code is good but th

Re: help with string manipulation (Find,Replace)

2004-03-29 Thread cf coder
Many Thanks Yalta for your help. Your code is good but there it does handle the comments column properly if the comments column has the following data: *** 09/05/2002  18:46:21 *** Closing as no point to this log Hot Swap *** 17/04/2002  13:08:15  *** OK can ayone tell me where the Request for the

Re: help with string manipulation (Find,Replace)

2004-03-29 Thread Yalta Classen
OK, just do something like   to get rid of all leading characters you do not want, and then use sTmp for you Find. Just a few remarks: '^[^a-z0-9_]*([a-z0-9_])' means First ^- Start at the start of the string only [] one of those inside, with the second ^ - one of those NOT inside * - repeated 0

help with string manipulation (Find,Replace)

2004-03-29 Thread cf coder
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. "TEST - CLOSE CALL *** 10/28/2003 2:53:52 *** THIS IS A TEST- PLEASE CLOSE CALL *** 04/06/2003  12:33:5"