RE: Help Please: Find/Replace
To take a page from Raymond Camden: -- Ben Doom Regular Expression Jedi Apprentice Moonbow Software, Inc :-) Come, Padwans from across the globe, go on a pilgramage to the source of all things CF-RegEx: http://www.houseoffusion.com/cf_lists/index.cfm?method=threads&forumid=21 There, we have faced the Dark Side and have always been victorious. Bring us your frustrations, and we shall defeat them, for frustration leads to hate, hate leads to pain, pain leads to using ASP, and that way lies the Dark Side. :-) : -Original Message- : From: charlie griefer [mailto:[EMAIL PROTECTED]] : Sent: Thursday, January 23, 2003 3:27 PM : To: CF-Talk : Subject: Re: Help Please: Find/Replace : : : Kelly Matthews writes: : : > YOU RULE! :) that worked just wonderfully :-) : : He is an elite RegExp Ninja :) ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Help Please: Find/Replace
Kelly Matthews writes: > YOU RULE! :) that worked just wonderfully :-) He is an elite RegExp Ninja :) > >>From: "Ben Doom" <[EMAIL PROTECTED]> >>Reply-To: [EMAIL PROTECTED] >>To: CF-Talk <[EMAIL PROTECTED]> >>Subject: RE: Help Please: Find/Replace >>Date: Thu, 23 Jan 2003 14:54:43 -0500 >> >>This sounds like a job for (da da da-dh) RegEx! >> >>You want something along the lines of >>string = rereplace(string, '\[([^]]+)\]', '\1', 'all'); >> >>I /think/ this will work. I've not tested it and whatnot. Working with >>brackets and other special characters always adds a bit of adventure to it. >>:-) >> >>HTH. >> >>And, of course, if you need more help or more in-depth commentary, jump on >>over to CF-RegEx (available via the [http://www.houseoffusion.com] >>website). >> >>Good luck. >> >> >>-- Ben Doom >> Programmer & General Lackey >> Moonbow Software, Inc >> >>: -Original Message- >>: From: Kelly Matthews [mailto:[EMAIL PROTECTED]] >>: Sent: Thursday, January 23, 2003 2:43 PM >>: To: CF-Talk >>: Subject: Help Please: Find/Replace >>: >>: >>: OK I am sure there is an ez way to do this my brain just doesn't >>: seem to be >>: working today... >>: >>: We have an application where some people may enter URLs they are >>: requested >>: to enter them like so >>: >>: [http://www.whatever.com] >>: [http://www.whatever2.com] >>: [http://www.whatever3.com] >>: >>: What i want to be able to do is find each [ ] and take what's in >>: the middle >>: of it and wrap it in a >: href="http://www.whatever.com";>http://www.whatever.com and >>: remove the [ >>: ] there may be multiple URLS in the text. I have been messin around with >>: the find/replace etc. for a bit now and running into some problems. I am >>: sure i am just doing it wrong. Any suggestions on how to do this right? >>: >>: Kelly >>: >>: >>: >> > ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Help Please: Find/Replace
YOU RULE! :) that worked just wonderfully :-) >From: "Ben Doom" <[EMAIL PROTECTED]> >Reply-To: [EMAIL PROTECTED] >To: CF-Talk <[EMAIL PROTECTED]> >Subject: RE: Help Please: Find/Replace >Date: Thu, 23 Jan 2003 14:54:43 -0500 > >This sounds like a job for (da da da-dh) RegEx! > >You want something along the lines of >string = rereplace(string, '\[([^]]+)\]', '\1', 'all'); > >I /think/ this will work. I've not tested it and whatnot. Working with >brackets and other special characters always adds a bit of adventure to it. >:-) > >HTH. > >And, of course, if you need more help or more in-depth commentary, jump on >over to CF-RegEx (available via the [http://www.houseoffusion.com] >website). > >Good luck. > > >-- Ben Doom > Programmer & General Lackey > Moonbow Software, Inc > >: -Original Message- >: From: Kelly Matthews [mailto:[EMAIL PROTECTED]] >: Sent: Thursday, January 23, 2003 2:43 PM >: To: CF-Talk >: Subject: Help Please: Find/Replace >: >: >: OK I am sure there is an ez way to do this my brain just doesn't >: seem to be >: working today... >: >: We have an application where some people may enter URLs they are >: requested >: to enter them like so >: >: [http://www.whatever.com] >: [http://www.whatever2.com] >: [http://www.whatever3.com] >: >: What i want to be able to do is find each [ ] and take what's in >: the middle >: of it and wrap it in a : href="http://www.whatever.com";>http://www.whatever.com and >: remove the [ >: ] there may be multiple URLS in the text. I have been messin around with >: the find/replace etc. for a bit now and running into some problems. I am >: sure i am just doing it wrong. Any suggestions on how to do this right? >: >: Kelly >: >: >: > ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Help Please: Find/Replace
This sounds like a job for (da da da-dh) RegEx! You want something along the lines of string = rereplace(string, '\[([^]]+)\]', '\1', 'all'); I /think/ this will work. I've not tested it and whatnot. Working with brackets and other special characters always adds a bit of adventure to it. :-) HTH. And, of course, if you need more help or more in-depth commentary, jump on over to CF-RegEx (available via the [http://www.houseoffusion.com] website). Good luck. -- Ben Doom Programmer & General Lackey Moonbow Software, Inc : -Original Message- : From: Kelly Matthews [mailto:[EMAIL PROTECTED]] : Sent: Thursday, January 23, 2003 2:43 PM : To: CF-Talk : Subject: Help Please: Find/Replace : : : OK I am sure there is an ez way to do this my brain just doesn't : seem to be : working today... : : We have an application where some people may enter URLs they are : requested : to enter them like so : : [http://www.whatever.com] : [http://www.whatever2.com] : [http://www.whatever3.com] : : What i want to be able to do is find each [ ] and take what's in : the middle : of it and wrap it in a http://www.whatever.com";>http://www.whatever.com and : remove the [ : ] there may be multiple URLS in the text. I have been messin around with : the find/replace etc. for a bit now and running into some problems. I am : sure i am just doing it wrong. Any suggestions on how to do this right? : : Kelly : : : ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Help Please: Find/Replace
OK I am sure there is an ez way to do this my brain just doesn't seem to be working today... We have an application where some people may enter URLs they are requested to enter them like so [http://www.whatever.com] [http://www.whatever2.com] [http://www.whatever3.com] What i want to be able to do is find each [ ] and take what's in the middle of it and wrap it in a http://www.whatever.com";>http://www.whatever.com and remove the [ ] there may be multiple URLS in the text. I have been messin around with the find/replace etc. for a bit now and running into some problems. I am sure i am just doing it wrong. Any suggestions on how to do this right? Kelly ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4