Regex help looking for a name in a string.

2007-04-27 Thread Will Swain
Ok, no doubt this is an easy RegEx question, but not for me. I have two queries. One returns a set of names, the other a string which may or may not contain one or more of the names. I want to check for the existence of a name in the string, and if I find it, make it a hyperlink. So far I hav

RE: Regex help looking for a name in a string.

2007-04-27 Thread Gaulin, Mark
Regex help looking for a name in a string. Ok, no doubt this is an easy RegEx question, but not for me. I have two queries. One returns a set of names, the other a string which may or may not contain one or more of the names. I want to check for the existence of a name in the string, and if I find i

RE: Regex help looking for a name in a string.

2007-04-27 Thread Bobby Hartsfield
Reorder by length so the longer names come first. Also, I think you only need replace(works_string, artist, "#artist#", "all") -Original Message- From: Will Swain [mailto:[EMAIL PROTECTED] Sent: Friday, April 27, 2007 5:27 AM To: CF-Talk Subject: Regex help looking fo

Re: Regex help looking for a name in a string.

2007-04-27 Thread Zaphod Beeblebrox
It does really look like your using Regex's. Since you're looking for strings essentially, can't you just use ReplaceNoCase? On 4/27/07, Will Swain <[EMAIL PROTECTED]> wrote: > Ok, no doubt this is an easy RegEx question, but not for me. > > I have two queries. One returns a set of names, the oth

Re: Regex help looking for a name in a string.

2007-04-27 Thread Zaphod Beeblebrox
that should be "It doesn't really look like your using Regex's" On 4/27/07, Zaphod Beeblebrox <[EMAIL PROTECTED]> wrote: > It does really look like your using Regex's. Since you're looking for > strings essentially, can't you just use ReplaceNoCase? > > On 4/27/07, Will Swain <[EMAIL PROTECTED]>

RE: Regex help looking for a name in a string.

2007-04-27 Thread Will Swain
--- From: Gaulin, Mark [mailto:[EMAIL PROTECTED] Sent: 27 April 2007 13:27 To: CF-Talk Subject: RE: Regex help looking for a name in a string. Is there a delimited in the list of names (work_string), something that you can include in your reg ex to "anchor" it to an entire entry?

Re: Regex help looking for a name in a string.

2007-04-27 Thread James Holmes
Are the names delimited by something (like commas) or just strung together? On 4/27/07, Will Swain wrote: > Ok, no doubt this is an easy RegEx question, but not for me. > > I have two queries. One returns a set of names, the other a string which may > or may not contain one or more of the names.

RE: Regex help looking for a name in a string.

2007-04-27 Thread Will Swain
Hi James, See my previous reply. They aren't delimited by anything in particular. Thanks. will -Original Message- From: James Holmes [mailto:[EMAIL PROTECTED] Sent: 27 April 2007 14:27 To: CF-Talk Subject: Re: Regex help looking for a name in a string. Are the names delimit

RE: Regex help looking for a name in a string.

2007-04-27 Thread Will Swain
Sure. But it still wouldn't work. :) -Original Message- From: Zaphod Beeblebrox [mailto:[EMAIL PROTECTED] Sent: 27 April 2007 13:56 To: CF-Talk Subject: Re: Regex help looking for a name in a string. It does really look like your using Regex's. Since you're look

RE: Regex help looking for a name in a string.

2007-04-27 Thread Gaulin, Mark
lution can be described and wil work, so that's something. Mark -Original Message- From: Bobby Hartsfield [mailto:[EMAIL PROTECTED] Sent: Friday, April 27, 2007 8:47 AM To: CF-Talk Subject: RE: Regex help looking for a name in a string. Reorder by length so the longer n

RE: Regex help looking for a name in a string.

2007-04-27 Thread Leitch, Oblio
Well, I've got a couple of comments, for what they're worth. First, you're not using RegEx. Next, it appears that what you're doing here: #artist#", "ALL")> is you have two queries, one of the event(s), one grabbing a list of artists. Are you sorting

RE: Regex help looking for a name in a string.

2007-04-27 Thread Will Swain
Hi Bobby, Out of interest, how would I reorder by length? In the query? MySQL 4.1.7 Thanks Will -Original Message- From: Bobby Hartsfield [mailto:[EMAIL PROTECTED] Sent: 27 April 2007 13:47 To: CF-Talk Subject: RE: Regex help looking for a name in a string. Reorder by length so the

RE: Regex help looking for a name in a string.

2007-04-27 Thread Will Swain
ing to think an alternative approach might be in order here... -Original Message- From: Leitch, Oblio [mailto:[EMAIL PROTECTED] Sent: 27 April 2007 14:48 To: CF-Talk Subject: RE: Regex help looking for a name in a string. Well, I've got a couple of comments, for what they're worth.

RE: Regex help looking for a name in a string.

2007-04-27 Thread Bobby Hartsfield
Yes, Do it in your query. Try this... Select artist >From tablename Order by length(artist) -Original Message- From: Will Swain [mailto:[EMAIL PROTECTED] Sent: Friday, April 27, 2007 10:24 AM To: CF-Talk Subject: RE: Regex help looking for a name in a string. Hi Bobby, Out

RE: Regex help looking for a name in a string.

2007-04-27 Thread Bobby Hartsfield
looking for a name in a string. Yes, Do it in your query. Try this... Select artist >From tablename Order by length(artist) -Original Message- From: Will Swain [mailto:[EMAIL PROTECTED] Sent: Friday, April 27, 2007 10:24 AM To: CF-Talk Subject: RE: Regex help looking for a name i

RE: Regex help looking for a name in a string.

2007-04-27 Thread Bobby Hartsfield
Or a couple loops #artist#", "all") /> That did the trick for me. -Original Message- From: Bobby Hartsfield [mailto:[EMAIL PROTECTED] Sent: Friday, April 27, 2007 3:34 PM To: CF-Talk Subject: RE: Regex help looking for a name in a string.

RE: Regex help looking for a name in a string.

2007-04-27 Thread Will Swain
Good plan. I reckon that will work. Now to play with the regex... Cheers w -Original Message- From: Bobby Hartsfield [mailto:[EMAIL PROTECTED] Sent: 27 April 2007 20:34 To: CF-Talk Subject: RE: Regex help looking for a name in a string. I don't know what I was thinking but that

RE: Regex help looking for a name in a string.

2007-04-27 Thread Will Swain
That's sweet Bobby - seems to work a treat. Thanks very much. Will -Original Message- From: Bobby Hartsfield [mailto:[EMAIL PROTECTED] Sent: 27 April 2007 20:43 To: CF-Talk Subject: RE: Regex help looking for a name in a string. Or a couple loops #a

RE: Regex help looking for a name in a string.

2007-04-27 Thread Bobby Hartsfield
Sorry, Should have said that you DO still have to: order by length(artist) desc -Original Message- From: Bobby Hartsfield [mailto:[EMAIL PROTECTED] Sent: Friday, April 27, 2007 3:43 PM To: CF-Talk Subject: RE: Regex help looking for a name in a string. Or a couple loops

RE: Regex help looking for a name in a string.

2007-04-27 Thread Will Swain
Thanks Bobby, I owe you a beer. And not just for this but for http://www.acoderslife.com/news/index.cfm?storyid=7 too!! Will -Original Message- From: Bobby Hartsfield [mailto:[EMAIL PROTECTED] Sent: 27 April 2007 21:21 To: CF-Talk Subject: RE: Regex help looking for a name in a string

RE: Regex help looking for a name in a string.

2007-04-27 Thread Bobby Hartsfield
Haha! Beer may have played a part in that article... oh and I accept the beer. ;-) Cheers! -Original Message- From: Will Swain [mailto:[EMAIL PROTECTED] Sent: Friday, April 27, 2007 5:01 PM To: CF-Talk Subject: RE: Regex help looking for a name in a string. Thanks Bobby, I owe you a