Re: Regex question

2013-07-17 Thread Cameron Childress

On Wed, Jul 17, 2013 at 11:15 AM, Matthew Allen wrote:

 Is it possible to change the reference-link tag from a reference link tag
  reference-link id=1 type=reference/ to a superscript as so
 sup1/sup, basically getting the value of the id attribute of the
 reference link tag and creating a superscript tag with the value.


I'll let someone else help with regex, but my comment from the peanut
gallery: This smells like something you may be able to easily do using
jQuery and let the client side manage this.

-Cameron

-- 
Cameron Childress
--
p:   678.637.5072
im: cameroncf
facebook http://www.facebook.com/cameroncf |
twitterhttp://twitter.com/cameronc |
google+ https://profiles.google.com/u/0/117829379451708140985


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:356216
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Regex question

2013-07-17 Thread Matthew Allen

I have a body of text as below:

body body body bodybodybody bodybody body body reference-link id=1 
type=reference/ body body body
reference-link id=2 type=reference/body body body bodybody body body body 
body

Is it possible to change the reference-link tag from a reference link tag  
reference-link id=1 type=reference/ to a superscript as so sup1/sup, 
basically getting the value of the id attribute of the reference link tag and 
creating a superscript tag with the value.

Many thanks,

Matt  

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:356215
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: RegEx Question

2011-05-20 Thread Peter Boughton

Not only can you do it with jQuery, you /should/ do it with jQuery (or equiv).

Regex is not built for HTML parsing, and there are many reasons why it wont 
work correctly when you try. Rather than worry about numerous edge cases, use a 
tool designed for the job from the start.



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:344746
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: RegEx Question

2011-05-19 Thread Duane Boudreau

Thanks that's brilliant!

-Original Message-
From: Dominic Watson [mailto:watson.domi...@googlemail.com] 
Sent: Wednesday, May 18, 2011 5:42 AM
To: cf-talk
Subject: Re: RegEx Question


Here is a very blunt regex that should match the opening tag (does not check 
for the lack of target=_blank:

a.*?href=.*?\.pdf.*?

Here's a great site:

http://gskinner.com/RegExr/



On 18 May 2011 02:30, Lists li...@commadelimited.com wrote:

 You could actually do this with jquery quite easily should you want to do it 
 client side.

 $('a[href*=pdf]').click(function(){
 window.open($(this).href);
 })


 On May 17, 2011, at 5:35 PM, Duane Boudreau du...@sandybay.com wrote:


 Hi All,

 First time posting in a very long time.

 I'm stuck on a RegEx problem that I can't wrap my head around. I need to 
 have a block of html and I need to add target=_blank to any hyperlink that 
 has a pdf link in it. Any suggestions?

 Here is the match string I tried so far but I don't think I'm even close.

 a\\s[^]*href=['\\\]( (?i:)(?:jpg|gif|doc|pdf)$*)

 If anyone can point me in the right direction it would be much appreciated.

 TIA,
 Duane



 



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:344675
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: RegEx Question

2011-05-18 Thread Dominic Watson

Here is a very blunt regex that should match the opening tag (does not
check for the lack of target=_blank:

a.*?href=.*?\.pdf.*?

Here's a great site:

http://gskinner.com/RegExr/



On 18 May 2011 02:30, Lists li...@commadelimited.com wrote:

 You could actually do this with jquery quite easily should you want to do it 
 client side.

 $('a[href*=pdf]').click(function(){
 window.open($(this).href);
 })


 On May 17, 2011, at 5:35 PM, Duane Boudreau du...@sandybay.com wrote:


 Hi All,

 First time posting in a very long time.

 I'm stuck on a RegEx problem that I can't wrap my head around. I need to 
 have a block of html and I need to add target=_blank to any hyperlink that 
 has a pdf link in it. Any suggestions?

 Here is the match string I tried so far but I don't think I'm even close.

 a\\s[^]*href=['\\\]( (?i:)(?:jpg|gif|doc|pdf)$*)

 If anyone can point me in the right direction it would be much appreciated.

 TIA,
 Duane



 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:344611
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RegEx Question

2011-05-17 Thread Duane Boudreau

Hi All,

First time posting in a very long time.

I'm stuck on a RegEx problem that I can't wrap my head around. I need to have a 
block of html and I need to add target=_blank to any hyperlink that has a pdf 
link in it. Any suggestions?

Here is the match string I tried so far but I don't think I'm even close.

a\\s[^]*href=['\\\]( (?i:)(?:jpg|gif|doc|pdf)$*)

If anyone can point me in the right direction it would be much appreciated.

TIA,
Duane

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:344604
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: RegEx Question

2011-05-17 Thread Lists

You could actually do this with jquery quite easily should you want to do it 
client side. 

$('a[href*=pdf]').click(function(){
window.open($(this).href);
})


On May 17, 2011, at 5:35 PM, Duane Boudreau du...@sandybay.com wrote:

 
 Hi All,
 
 First time posting in a very long time.
 
 I'm stuck on a RegEx problem that I can't wrap my head around. I need to have 
 a block of html and I need to add target=_blank to any hyperlink that has a 
 pdf link in it. Any suggestions?
 
 Here is the match string I tried so far but I don't think I'm even close.
 
 a\\s[^]*href=['\\\]( (?i:)(?:jpg|gif|doc|pdf)$*)
 
 If anyone can point me in the right direction it would be much appreciated.
 
 TIA,
 Duane
 
 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:344609
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Regex Question

2011-04-28 Thread Rick Colman

input looks like:

(A XXX)(B YYY)(C ZZZ) 

I need to pull out:

XXXYYYZZZ ...

Can somebody help?

TNX.

Rick.

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:344023
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Regex Question

2011-04-28 Thread Charlie Griefer

Could be as simple as \w{3} 

Would that do it (searching for 3 consecutive word characters)?

-- 
Charlie Griefer
http://charlie.griefer.com

I have failed as much as I have succeeded. But I love my life. I love my wife. 
And I wish you my kind of success.
On Thursday, April 28, 2011 at 10:10 AM, Rick Colman wrote: 
 
 input looks like:
 
 (A XXX)(B YYY)(C ZZZ) 
 
 I need to pull out:
 
 XXXYYYZZZ ...
 
 Can somebody help?
 
 TNX.
 
 Rick.
 
 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:344026
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: Regex Question

2011-04-28 Thread Jenny Gavin-Wear

Perhaps using list functions?

cfset myList =(A XXX)(B YYY)(C ZZZ)
cfset loop1 = listlen(mylist,))
cfset myresult = 
cfoutput
cfloop from=1 to=#loop1# index=A
cfset loopStr1 = listgetat(myList, A, ))
cfset myResult = #myresult##right(loopStr1, 3)#
/cfloop
/cfoutput


-Original Message-
From: Rick Colman [mailto:rcol...@cox.net]
Sent: 28 April 2011 18:10
To: cf-talk
Subject: Regex Question



input looks like:

(A XXX)(B YYY)(C ZZZ) 

I need to pull out:

XXXYYYZZZ ...

Can somebody help?

TNX.

Rick.



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:344027
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Regex Question

2011-04-28 Thread Andy Matthews

That seems like it might do the trick:

http://regexr.com?2tl99

 Could be as simple as \w{3} 
 
 Would that do it (searching for 3 consecutive word characters)?
 
 -- 
 Charlie Griefer
 http://charlie.griefer.com
 
 I have failed as much as I have succeeded. But I love my life. I love 
 my wife. And I wish you my kind of success.
 On Thursday, April 28, 2011 at 10:10 AM, Rick Colman wrote: 
  
  input looks like:
  
  (A XXX)(B YYY)(C ZZZ) 
  
  I need to pull out:
  
  XXXYYYZZZ ...
  
  Can somebody help?
  
  TNX.
  
  Rick.
  
  


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:344030
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Regex Question

2011-04-28 Thread Rick Colman

would it ignore the parens and space? will try shortly. TNX!

On 4/28/2011 1:17 PM, Andy Matthews wrote:
 That seems like it might do the trick:

 http://regexr.com?2tl99

 Could be as simple as \w{3}

 Would that do it (searching for 3 consecutive word characters)?

 -- 
 Charlie Griefer
 http://charlie.griefer.com

 I have failed as much as I have succeeded. But I love my life. I love
 my wife. And I wish you my kind of success.
 On Thursday, April 28, 2011 at 10:10 AM, Rick Colman wrote:
 input looks like:

 (A XXX)(B YYY)(C ZZZ) 

 I need to pull out:

 XXXYYYZZZ ...

 Can somebody help?

 TNX.

 Rick.



 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:344032
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Regex Question

2010-12-03 Thread Robert Harrison

Regex is not my strong suit,  but someone may know this off the top of their 
head.   If I have a long url like: 

http://www.mysite.com/item1/option2/part3/section4

I can use cgi.path_info to get the /item1/option2/part3/section4  part of the 
string. 

Now is there an easy regex that could let me get the 

item1
option2
part3
section4

parts of the string easily? 

I'd assume there could just be one regex statement where you could just change 
the number(s) to get data from first / to second /; data from second / to third 
/, etc. 

Any ideas?

Thanks

Robert B. Harrison
Director of Interactive Services
Austin  Williams
125 Kennedy Drive, Suite 100 
Hauppauge NY 11788
P : 631.231.6600 Ext. 119 
F : 631.434.7022
http://www.austin-williams.com 

Great advertising can't be either/or.  It must be .

Plug in to our blog: AW Unplugged
http://www.austin-williams.com/unplugged



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339756
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Regex Question

2010-12-03 Thread Carl Von Stetten

Robert,

How about treating CGI.path_info as a list, using / as your 
delimiter.  Then you can use the various list* functions in CF to parse 
it however you want.

Carl

On 12/3/2010 9:26 AM, Robert Harrison wrote:
 Regex is not my strong suit,  but someone may know this off the top of their 
 head.   If I have a long url like:

   http://www.mysite.com/item1/option2/part3/section4

 I can use cgi.path_info to get the /item1/option2/part3/section4  part of the 
 string.

 Now is there an easy regex that could let me get the

   item1
   option2
   part3
   section4

 parts of the string easily?

 I'd assume there could just be one regex statement where you could just 
 change the number(s) to get data from first / to second /; data from second / 
 to third /, etc.

 Any ideas?

 Thanks

 Robert B. Harrison
 Director of Interactive Services
 Austin  Williams
 125 Kennedy Drive, Suite 100
 Hauppauge NY 11788
 P : 631.231.6600 Ext. 119
 F : 631.434.7022
 http://www.austin-williams.com

 Great advertising can't be either/or.  It must be.

 Plug in to our blog: AW Unplugged
 http://www.austin-williams.com/unplugged



 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339757
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Regex Question

2010-12-03 Thread Jason Fisher

Agreed.


/item1/option2/part3/section4


cfoutput
item = #listFirst(cgi.path_info, /)#
br /
option = #listGetAt(cgi.path_info, 2, /)#
br /
part = #listGetAt(cgi.path_info, 3, /)#
br /
section = #listLast(cgi.path_info, /)#
/cfoutput




From: Carl Von Stetten vonner.li...@vonner.net
Sent: Friday, December 03, 2010 12:36 PM
To: cf-talk cf-talk@houseoffusion.com
Subject: Re: Regex Question

Robert,

How about treating CGI.path_info as a list, using / as your 
delimiter.  Then you can use the various list* functions in CF to parse 
it however you want.

Carl

On 12/3/2010 9:26 AM, Robert Harrison wrote:
 Regex is not my strong suit,  but someone may know this off the top of 
their head.   If I have a long url like:

   http://www.mysite.com/item1/option2/part3/section4

 I can use cgi.path_info to get the /item1/option2/part3/section4  part of 
the string.

 Now is there an easy regex that could let me get the

   item1
   option2
   part3
   section4

 parts of the string easily?

 I'd assume there could just be one regex statement where you could just 
change the number(s) to get data from first / to second /; data from second 
/ to third /, etc.

 Any ideas?

 Thanks

 Robert B. Harrison
 Director of Interactive Services
 Austin  Williams
 125 Kennedy Drive, Suite 100
 Hauppauge NY 11788
 P : 631.231.6600 Ext. 119
 F : 631.434.7022
 http://www.austin-williams.com

 Great advertising can't be either/or.  It must be.

 Plug in to our blog: AW Unplugged
 http://www.austin-williams.com/unplugged



 



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339760
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: Regex Question

2010-12-03 Thread Robert Harrison

 listGetAt(cgi.path_info, 2, /)

Great. That will work for what I want. 

I want to be able to pass the cgi.path_info to a CFC and pass a digit so the 
CFC could extract the part of the string I want to do a query... I'm using long 
URLs to pass variables more and more these days, as opposed to 
?bin=1item=2part=3. 

Thanks

Robert B. Harrison
Director of Interactive Services
Austin  Williams
125 Kennedy Drive, Suite 100 
Hauppauge NY 11788
P : 631.231.6600 Ext. 119 
F : 631.434.7022
http://www.austin-williams.com 

Great advertising can't be either/or.  It must be .

Plug in to our blog: AW Unplugged
http://www.austin-williams.com/unplugged




~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339761
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: Regex Question

2010-12-03 Thread Jason Fisher

Yep, that'll work.  Of course, listGetAt(cgi.path_info, 1, /) is the same 
as listFirst(cgi.path_info, /), so just passing the integer is a nice 
solution:


returnVar = listGetAt(arguments.path_info, arguments.index, /);




From: Robert Harrison rob...@austin-williams.com
Sent: Friday, December 03, 2010 1:03 PM
To: cf-talk cf-talk@houseoffusion.com
Subject: RE: Regex Question

 listGetAt(cgi.path_info, 2, /)

Great. That will work for what I want. 

I want to be able to pass the cgi.path_info to a CFC and pass a digit so 
the CFC could extract the part of the string I want to do a query... I'm 
using long URLs to pass variables more and more these days, as opposed to 
?bin=1item=2part=3. 

Thanks

Robert B. Harrison
Director of Interactive Services
Austin  Williams
125 Kennedy Drive, Suite 100 
Hauppauge NY 11788
P : 631.231.6600 Ext. 119 
F : 631.434.7022
http://www.austin-williams.com 

Great advertising can't be either/or.  It must be .

Plug in to our blog: AW Unplugged
http://www.austin-williams.com/unplugged



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339762
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Quick Regex Question

2010-10-29 Thread Robert Harrison

I have the regex statement - ReReplace(new_dir,\W,,all)

That removes all non-alphanumeric characters from a sting.

If I want to remove all non-alphanumeric characters except the underscore, is 
that:ReReplace(new_dir,\W/_,,all) or ?

Thanks


Robert B. Harrison
Director of Interactive Services
Austin  Williams
125 Kennedy Drive, Suite 100 
Hauppauge NY 11788
P : 631.231.6600 Ext. 119 
F : 631.434.7022
http://www.austin-williams.com 

Great advertising can't be either/or.  It must be .

Plug in to our blog: AW Unplugged
http://www.austin-williams.com/unplugged




~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338669
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


NEVER MIND: Quick Regex Question

2010-10-29 Thread Robert Harrison

- ReReplace(new_dir,\W,,all) is any alphanumeric character and the _

Never Mind.

Thanks

Robert B. Harrison
Director of Interactive Services
Austin  Williams
125 Kennedy Drive, Suite 100 
Hauppauge NY 11788
P : 631.231.6600 Ext. 119 
F : 631.434.7022
http://www.austin-williams.com 

Great advertising can't be either/or.  It must be .

Plug in to our blog: AW Unplugged
http://www.austin-williams.com/unplugged



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338670
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Quick Regex Question

2010-10-29 Thread Nathan Strutz

Robert,

Actually, the underscore is counted as an alphanumeric in regular
expressions. Try just replacing \W with nothing and see what you get.

nathan strutz
[http://www.dopefly.com/] [http://hi.im/nathanstrutz]


On Fri, Oct 29, 2010 at 7:41 AM, Robert Harrison rob...@austin-williams.com
 wrote:


 I have the regex statement - ReReplace(new_dir,\W,,all)

 That removes all non-alphanumeric characters from a sting.

 If I want to remove all non-alphanumeric characters except the underscore,
 is that:ReReplace(new_dir,\W/_,,all) or ?

 Thanks


 Robert B. Harrison
 Director of Interactive Services
 Austin  Williams
 125 Kennedy Drive, Suite 100
 Hauppauge NY 11788
 P : 631.231.6600 Ext. 119
 F : 631.434.7022
 http://www.austin-williams.com

 Great advertising can't be either/or.  It must be .

 Plug in to our blog: AW Unplugged
 http://www.austin-williams.com/unplugged




 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338671
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Quick Regex Question

2010-10-29 Thread CDCaveman

unsubscribe 
 
 
In a message dated 10/29/2010 10:41:43 A.M. Eastern Daylight Time,  
rob...@austin-williams.com writes:


I  have the regex statement - ReReplace(new_dir,\W,,all)

That  removes all non-alphanumeric characters from a sting.

If I want to  remove all non-alphanumeric characters except the underscore, 
is that:   ReReplace(new_dir,\W/_,,all) or ?

Thanks


Robert  B. Harrison
Director of Interactive Services
Austin   Williams
125 Kennedy Drive, Suite 100 
Hauppauge NY 11788
P :  631.231.6600 Ext. 119 
F : 631.434.7022
http://www.austin-williams.com  

Great advertising can't be either/or.  It must be  .

Plug in to our blog: AW  Unplugged
http://www.austin-williams.com/unplugged






~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338687
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Regex question

2010-08-19 Thread Ian Skinner

  I need to turn some relative links into absolute links in a string.

I have this rereplace() working well to do that.

rereplace(links,'(href=)([^]*)','\1http://www.cdpr.ca.gov\2','ALL')

But there is one link in the string that is already absolute going to a 
different domain.  Is there an easy way to filter it out?  This replace 
will happily prepend the above domain in front of the other domain in 
the absolute link.

TIA
Ian

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:336415
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Regex question

2010-08-19 Thread Ian Skinner

  On 8/19/2010 8:32 AM, Ian Skinner wrote:
 I need to turn some relative links into absolute links in a string.

 I have this rereplace() working well to do that.

 rereplace(links,'(href=)([^]*)','\1http://www.cdpr.ca.gov\2','ALL')

Thank you Ian, adding the forward slash[/]  character in two places 
solved this nicely!

rereplace(links,'(href=)/([^]*)','\1http://www.cdpr.ca.gov/\2','ALL')

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:336417
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


CF regex question [SOT]

2010-05-28 Thread Greg Morphis

I just ran into a problem with some old code one of team mates did. He
used cfqueryparams but did not specify a cfsqltype. We upgraded our
DB from Oracle 9i to 10g and all of the sudden we're getting Error
Executing Database Query errors. Logs show A nonnumeric character was
found when expecting a numeric character.
One of the queries had a date column and the cfqueryparam looked like
cfqueryparam value=foo / no cfsqltype and according to the docs
it's default is CF_SQL_CHAR.
So I need to go through the 1321 cfqueryparams and look for ones with
no cf_sql_type.
Is there a regex I can throw into Eclipse to help find these queries?

Thanks!

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334094
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: CF regex question [SOT]

2010-05-28 Thread Andy Matthews

Per the good Jason Dean at www.12robots.com:

cfqueryparam(.?[^(cf_sql_type)])+?

Tested against these:

cfqueryparam value=foo /
cfqueryparam value=foo
cfqueryparam value=#foo#

cfqueryparam value=foo cfsqltype=cf_sql_integer /
cfqueryparam cfsqltype=cf_sql_integer value=foo /

And the first three match.


andy

 

-Original Message-
From: Greg Morphis [mailto:gmorp...@gmail.com] 
Sent: Friday, May 28, 2010 1:39 PM
To: cf-talk
Subject: CF regex question [SOT]


I just ran into a problem with some old code one of team mates did. He used
cfqueryparams but did not specify a cfsqltype. We upgraded our DB from
Oracle 9i to 10g and all of the sudden we're getting Error Executing
Database Query errors. Logs show A nonnumeric character was found when
expecting a numeric character.
One of the queries had a date column and the cfqueryparam looked like
cfqueryparam value=foo / no cfsqltype and according to the docs it's
default is CF_SQL_CHAR.
So I need to go through the 1321 cfqueryparams and look for ones with no
cf_sql_type.
Is there a regex I can throw into Eclipse to help find these queries?

Thanks!



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334096
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: RE: CF regex question [SOT]

2010-05-28 Thread Greg Morphis

Seems to work beautifully! Thanks!

On May 28, 2010 3:05 PM, Andy Matthews li...@commadelimited.com wrote:


Per the good Jason Dean at www.12robots.com:

cfqueryparam(.?[^(cf_sql_type)])+?

Tested against these:

cfqueryparam value=foo /
cfqueryparam value=foo
cfqueryparam value=#foo#

cfqueryparam value=foo cfsqltype=cf_sql_integer /
cfqueryparam cfsqltype=cf_sql_integer value=foo /

And the first three match.


andy




-Original Message-
From: Greg Morphis [mailto:gmorp...@gmail.com]
Sent: Friday, May 28,...


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334097
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: CF regex question [SOT]

2010-05-28 Thread Will Tomlinson

Seems to work beautifully! Thanks!


As long as you don't have any variables/values with cf in them. hehehe..

cfqueryparam value=anythingcfanything /  doesn't match. 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334098
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: Easy Regex question?

2010-03-15 Thread Che Vilnonis

Carol, I used...

reReplaceNoCase(myHTML, table.*?.*?/table, , ALL) 

-Original Message-
From: Bobby Hartsfield [mailto:bo...@acoderslife.com] 
Sent: Saturday, March 13, 2010 10:01 AM
To: cf-talk
Subject: RE: Easy Regex question?


Rereplace(html, table.*?/table, , all')

Or

Rereplace(html, table[^]+/table, , all')


-Original Message-
From: Carol F [mailto:cfcn...@gmail.com]
Sent: Saturday, March 13, 2010 1:59 AM
To: cf-talk
Subject: Re: Easy Regex question?


I tried it on:
   htmlhead/headbodytexttablewhatever/table/body/html
but it's returning this string in an array
   tablewhatever/table
instead of
   htmlhead/headbodytexttablewhatever/table/body/html

I guess I can do
   arrTable = reMatchNoCase('table[^]+/table', myString);
   for(a=1; a = arrayLen(arrTable); a++){
   myString = replace(myString, arrTable[a], );
   }

but is there an easier way?


On Fri, Mar 12, 2010 at 8:29 PM, andy matthews
li...@commadelimited.comwrote:


 Should be able to do this:

 REMatchNoCase('table[^]+/table', myString)


 -Original Message-
 From: Carol F [mailto:cfcn...@gmail.com]
 Sent: Friday, March 12, 2010 6:52 PM
 To: cf-talk
 Subject: Re: Easy Regex question?


 do you mind sharing the solution please?

 On Fri, Mar 12, 2010 at 1:28 PM, Che Vilnonis ch...@asitv.com wrote:

 
  Scratch that... I figured it out!
 
  -Original Message-
  From: Che Vilnonis [mailto:ch...@asitv.com]
  Sent: Friday, March 12, 2010 4:25 PM
  To: 'cf-talk@houseoffusion.com'
  Subject: Easy Regex question?
 
  This should be easy.
  How do I remove all text between table/table tags from a larger
 string?
 
  Thanks, Che
 
 
 
 



 





~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331740
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Easy Regex question?

2010-03-15 Thread Carol F

Thanks Bobby and Che!

On Mon, Mar 15, 2010 at 6:00 AM, Che Vilnonis ch...@asitv.com wrote:


 Carol, I used...

 reReplaceNoCase(myHTML, table.*?.*?/table, , ALL)

 -Original Message-
 From: Bobby Hartsfield [mailto:bo...@acoderslife.com]
 Sent: Saturday, March 13, 2010 10:01 AM
 To: cf-talk
 Subject: RE: Easy Regex question?


 Rereplace(html, table.*?/table, , all')

 Or

 Rereplace(html, table[^]+/table, , all')


 -Original Message-
 From: Carol F [mailto:cfcn...@gmail.com]
 Sent: Saturday, March 13, 2010 1:59 AM
 To: cf-talk
 Subject: Re: Easy Regex question?


 I tried it on:
   htmlhead/headbodytexttablewhatever/table/body/html
 but it's returning this string in an array
   tablewhatever/table
 instead of
   htmlhead/headbodytexttablewhatever/table/body/html

 I guess I can do
   arrTable = reMatchNoCase('table[^]+/table', myString);
   for(a=1; a = arrayLen(arrTable); a++){
   myString = replace(myString, arrTable[a], );
   }

 but is there an easier way?


 On Fri, Mar 12, 2010 at 8:29 PM, andy matthews
 li...@commadelimited.comwrote:

 
  Should be able to do this:
 
  REMatchNoCase('table[^]+/table', myString)
 
 
  -Original Message-
  From: Carol F [mailto:cfcn...@gmail.com]
  Sent: Friday, March 12, 2010 6:52 PM
  To: cf-talk
  Subject: Re: Easy Regex question?
 
 
  do you mind sharing the solution please?
 
  On Fri, Mar 12, 2010 at 1:28 PM, Che Vilnonis ch...@asitv.com wrote:
 
  
   Scratch that... I figured it out!
  
   -Original Message-
   From: Che Vilnonis [mailto:ch...@asitv.com]
   Sent: Friday, March 12, 2010 4:25 PM
   To: 'cf-talk@houseoffusion.com'
   Subject: Easy Regex question?
  
   This should be easy.
   How do I remove all text between table/table tags from a larger
  string?
  
   Thanks, Che
  
  
  
  
 
 
 
 





 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331756
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Easy Regex question?

2010-03-13 Thread Carol F

I tried it on:
   htmlhead/headbodytexttablewhatever/table/body/html
but it's returning this string in an array
   tablewhatever/table
instead of
   htmlhead/headbodytexttablewhatever/table/body/html

I guess I can do
   arrTable = reMatchNoCase('table[^]+/table', myString);
   for(a=1; a = arrayLen(arrTable); a++){
   myString = replace(myString, arrTable[a], );
   }

but is there an easier way?


On Fri, Mar 12, 2010 at 8:29 PM, andy matthews li...@commadelimited.comwrote:


 Should be able to do this:

 REMatchNoCase('table[^]+/table', myString)


 -Original Message-
 From: Carol F [mailto:cfcn...@gmail.com]
 Sent: Friday, March 12, 2010 6:52 PM
 To: cf-talk
 Subject: Re: Easy Regex question?


 do you mind sharing the solution please?

 On Fri, Mar 12, 2010 at 1:28 PM, Che Vilnonis ch...@asitv.com wrote:

 
  Scratch that... I figured it out!
 
  -Original Message-
  From: Che Vilnonis [mailto:ch...@asitv.com]
  Sent: Friday, March 12, 2010 4:25 PM
  To: 'cf-talk@houseoffusion.com'
  Subject: Easy Regex question?
 
  This should be easy.
  How do I remove all text between table/table tags from a larger
 string?
 
  Thanks, Che
 
 
 
 



 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331723
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: Easy Regex question?

2010-03-13 Thread Bobby Hartsfield

Rereplace(html, table.*?/table, , all')

Or

Rereplace(html, table[^]+/table, , all')


-Original Message-
From: Carol F [mailto:cfcn...@gmail.com] 
Sent: Saturday, March 13, 2010 1:59 AM
To: cf-talk
Subject: Re: Easy Regex question?


I tried it on:
   htmlhead/headbodytexttablewhatever/table/body/html
but it's returning this string in an array
   tablewhatever/table
instead of
   htmlhead/headbodytexttablewhatever/table/body/html

I guess I can do
   arrTable = reMatchNoCase('table[^]+/table', myString);
   for(a=1; a = arrayLen(arrTable); a++){
   myString = replace(myString, arrTable[a], );
   }

but is there an easier way?


On Fri, Mar 12, 2010 at 8:29 PM, andy matthews
li...@commadelimited.comwrote:


 Should be able to do this:

 REMatchNoCase('table[^]+/table', myString)


 -Original Message-
 From: Carol F [mailto:cfcn...@gmail.com]
 Sent: Friday, March 12, 2010 6:52 PM
 To: cf-talk
 Subject: Re: Easy Regex question?


 do you mind sharing the solution please?

 On Fri, Mar 12, 2010 at 1:28 PM, Che Vilnonis ch...@asitv.com wrote:

 
  Scratch that... I figured it out!
 
  -Original Message-
  From: Che Vilnonis [mailto:ch...@asitv.com]
  Sent: Friday, March 12, 2010 4:25 PM
  To: 'cf-talk@houseoffusion.com'
  Subject: Easy Regex question?
 
  This should be easy.
  How do I remove all text between table/table tags from a larger
 string?
 
  Thanks, Che
 
 
 
 



 



~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331724
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Easy Regex question?

2010-03-12 Thread Che Vilnonis

This should be easy.
How do I remove all text between table/table tags from a larger string?

Thanks, Che



~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331712
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: Easy Regex question?

2010-03-12 Thread Che Vilnonis

Scratch that... I figured it out!

-Original Message-
From: Che Vilnonis [mailto:ch...@asitv.com] 
Sent: Friday, March 12, 2010 4:25 PM
To: 'cf-talk@houseoffusion.com'
Subject: Easy Regex question?

This should be easy.
How do I remove all text between table/table tags from a larger string?

Thanks, Che



~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331713
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Easy Regex question?

2010-03-12 Thread Carol F

do you mind sharing the solution please?

On Fri, Mar 12, 2010 at 1:28 PM, Che Vilnonis ch...@asitv.com wrote:


 Scratch that... I figured it out!

 -Original Message-
 From: Che Vilnonis [mailto:ch...@asitv.com]
 Sent: Friday, March 12, 2010 4:25 PM
 To: 'cf-talk@houseoffusion.com'
 Subject: Easy Regex question?

 This should be easy.
 How do I remove all text between table/table tags from a larger string?

 Thanks, Che



 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331720
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: Easy Regex question?

2010-03-12 Thread andy matthews

Should be able to do this:

REMatchNoCase('table[^]+/table', myString)


-Original Message-
From: Carol F [mailto:cfcn...@gmail.com] 
Sent: Friday, March 12, 2010 6:52 PM
To: cf-talk
Subject: Re: Easy Regex question?


do you mind sharing the solution please?

On Fri, Mar 12, 2010 at 1:28 PM, Che Vilnonis ch...@asitv.com wrote:


 Scratch that... I figured it out!

 -Original Message-
 From: Che Vilnonis [mailto:ch...@asitv.com]
 Sent: Friday, March 12, 2010 4:25 PM
 To: 'cf-talk@houseoffusion.com'
 Subject: Easy Regex question?

 This should be easy.
 How do I remove all text between table/table tags from a larger
string?

 Thanks, Che



 



~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331721
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Simple regex question

2009-06-10 Thread Rick Mason

I'm in need of some regex help.  I am working with a cfinput and I need a
pattern for regex validation that does the following:

Field can be blank but if filled out has to be exactly 17 characters which
are a combination of letters and numbers (VIN number)

Know this is simple but Google seems to be failing me this morning.

Thanks,

Rick


~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323342
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Simple regex question

2009-06-10 Thread Ben Nadel

Try this:

^$|^[\w]{17}$

-Ben

-- 
Ben Nadel
Adobe Community Expert
Adobe Certified Advanced ColdFusion Developer
Manager New York ColdFusion User Group
http://www.bennadel.com

Need ColdFusion Help?
http://www.bennadel.com/Ask-Ben


~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323343
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Simple regex question

2009-06-10 Thread Andy Matthews

[ ]|[a-z0-9]{17}

Should do it...

That basically allows for a space, or for 17 alphanumeric characters. 

-Original Message-
From: Rick Mason [mailto:rhma...@gmail.com] 
Sent: Wednesday, June 10, 2009 9:50 AM
To: cf-talk
Subject: Simple regex question


I'm in need of some regex help.  I am working with a cfinput and I need a
pattern for regex validation that does the following:

Field can be blank but if filled out has to be exactly 17 characters which
are a combination of letters and numbers (VIN number)

Know this is simple but Google seems to be failing me this morning.

Thanks,

Rick




~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323344
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Simple regex question

2009-06-10 Thread Andy Matthews

Great minds Ben...great minds. 

-Original Message-
From: Ben Nadel [mailto:b...@bennadel.com] 
Sent: Wednesday, June 10, 2009 9:51 AM
To: cf-talk
Subject: Re: Simple regex question


Try this:

^$|^[\w]{17}$

-Ben

--
Ben Nadel
Adobe Community Expert
Adobe Certified Advanced ColdFusion Developer Manager New York ColdFusion
User Group http://www.bennadel.com

Need ColdFusion Help?
http://www.bennadel.com/Ask-Ben




~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323345
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Simple regex question

2009-06-10 Thread Ben Nadel

Ha ha, most agreed :)


-- 
Ben Nadel
Adobe Community Expert
Adobe Certified Advanced ColdFusion Developer
Manager New York ColdFusion User Group
http://www.bennadel.com

Need ColdFusion Help?
http://www.bennadel.com/Ask-Ben


~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323346
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Simple regex question

2009-06-10 Thread Andy Matthews

Technically speaking, the regex that Ben or I posted isn't correct. You
can't just have 17 alnum characters as each character (or character pairs)
in a VIN has a specific slot. Plus, VINs don't have the letters I, O, or Q.

Here's an excellent forum post about the subject.

http://www.phpfreaks.com/forums/index.php?topic=217075.0

It all just depends on how accurate you need to be.


andy

-Original Message-
From: Andy Matthews [mailto:li...@commadelimited.com] 
Sent: Wednesday, June 10, 2009 9:52 AM
To: cf-talk
Subject: RE: Simple regex question


[ ]|[a-z0-9]{17}

Should do it...

That basically allows for a space, or for 17 alphanumeric characters. 

-Original Message-
From: Rick Mason [mailto:rhma...@gmail.com]
Sent: Wednesday, June 10, 2009 9:50 AM
To: cf-talk
Subject: Simple regex question


I'm in need of some regex help.  I am working with a cfinput and I need a
pattern for regex validation that does the following:

Field can be blank but if filled out has to be exactly 17 characters which
are a combination of letters and numbers (VIN number)

Know this is simple but Google seems to be failing me this morning.

Thanks,

Rick






~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323347
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Simple regex question

2009-06-10 Thread Ben Nadel

I have to plead ignorance on this one - I don't know what a VIN number is.

-- 
Ben Nadel
Adobe Community Expert
Adobe Certified Advanced ColdFusion Developer
Manager New York ColdFusion User Group
http://www.bennadel.com

Need ColdFusion Help?
http://www.bennadel.com/Ask-Ben


~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323348
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Simple regex question

2009-06-10 Thread Rick Mason

Thanks you Andy and Ben for your quick response.  A VIN number is a vehicle
identification number which is on your car's registration as well as being
on the driver side dash.

Think of it as a unique serial number for your car with vehicle information
baked into the number.

Andy the only problem that I had with your regex is that it let me enter
more than 17 characters.  I quickly added a maxlength which corrected the
problem.

There's a ISVIN function on CFLib and I had originally proposed to my boss
that I rewrite it in javascript but he didn't want that level of
functionality.


Rick

On Wed, Jun 10, 2009 at 10:58 AM, Ben Nadel b...@bennadel.com wrote:


 I have to plead ignorance on this one - I don't know what a VIN number is.

 --
 Ben Nadel
 Adobe Community Expert
 Adobe Certified Advanced ColdFusion Developer
 Manager New York ColdFusion User Group
 http://www.bennadel.com

 Need ColdFusion Help?
 http://www.bennadel.com/Ask-Ben


 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323351
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Simple regex question

2009-06-10 Thread Andy Matthews

Ben...

VIN numbers are unique identifiers for cars. Generally there's a small metal
plaque on the driver side part of the dashboard, tucked way back under the
windshield. It's a fascinating number, as each set of digits have very
specific meanings. You can almost everything about a vehicle from the VIN.


andy 

-Original Message-
From: Ben Nadel [mailto:b...@bennadel.com] 
Sent: Wednesday, June 10, 2009 9:59 AM
To: cf-talk
Subject: Re: Simple regex question


I have to plead ignorance on this one - I don't know what a VIN number is.

--
Ben Nadel
Adobe Community Expert
Adobe Certified Advanced ColdFusion Developer Manager New York ColdFusion
User Group http://www.bennadel.com

Need ColdFusion Help?
http://www.bennadel.com/Ask-Ben




~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323352
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: Simple regex question

2009-06-10 Thread Dawson, Michael

Think of it as a unique serial number for your car with vehicle
information baked into the number.

Show me the CARFAX!

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323353
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Simple regex question

2009-06-10 Thread Adrian Lynch

There's a ISVIN function on CFLib and I had originally proposed to my boss
that I rewrite it in javascript but he didn't want that level of
functionality.

Just do it, don't ask the boss! :OD


~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323355
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Simple regex question

2009-06-10 Thread Rick Mason

Andy,

I jumped the gun a little too quickly.  Neither yours nor Ben's works.  Your
code worked fine when I was just typing in numbers for a quick test.

Once I started testing with actual VIN numbers it failed.  It isn't counting
the letters in the total count.  So 12345678901234567 succeeds but
1M345678901234567 fails.

Any suggestions?


Rick

On Wed, Jun 10, 2009 at 10:52 AM, Andy Matthews li...@commadelimited.comwrote:


 [ ]|[a-z0-9]{17}

 Should do it...

 That basically allows for a space, or for 17 alphanumeric characters.

 -Original Message-
 From: Rick Mason [mailto:rhma...@gmail.com]
 Sent: Wednesday, June 10, 2009 9:50 AM
 To: cf-talk
 Subject: Simple regex question


 I'm in need of some regex help.  I am working with a cfinput and I need a
 pattern for regex validation that does the following:

 Field can be blank but if filled out has to be exactly 17 characters which
 are a combination of letters and numbers (VIN number)

 Know this is simple but Google seems to be failing me this morning.

 Thanks,

 Rick




 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323358
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Simple regex question

2009-06-10 Thread Azadi Saryev

change [a-z0-9] to [a-zA-Z0-9]

it only fails because Andy's regexp does not allow uppercase letters.


Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/


On 10/06/2009 23:15, Rick Mason wrote:
 Andy,
 
 I jumped the gun a little too quickly.  Neither yours nor Ben's works.  Your
 code worked fine when I was just typing in numbers for a quick test.
 
 Once I started testing with actual VIN numbers it failed.  It isn't counting
 the letters in the total count.  So 12345678901234567 succeeds but
 1M345678901234567 fails.
 
 Any suggestions?
 
 
 Rick
 
 On Wed, Jun 10, 2009 at 10:52 AM, Andy Matthews 
 li...@commadelimited.comwrote:
 
 [ ]|[a-z0-9]{17}

 Should do it...

 That basically allows for a space, or for 17 alphanumeric characters.

 -Original Message-
 From: Rick Mason [mailto:rhma...@gmail.com]
 Sent: Wednesday, June 10, 2009 9:50 AM
 To: cf-talk
 Subject: Simple regex question


 I'm in need of some regex help.  I am working with a cfinput and I need a
 pattern for regex validation that does the following:

 Field can be blank but if filled out has to be exactly 17 characters which
 are a combination of letters and numbers (VIN number)

 Know this is simple but Google seems to be failing me this morning.

 Thanks,

 Rick





 
 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323361
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Simple regex question

2009-06-10 Thread Azadi Saryev

PS: and Ben's needs to be adjusted to allow numbers:
^$|^[\w\d]{17}$


Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/


On 10/06/2009 23:15, Rick Mason wrote:
 Andy,
 
 I jumped the gun a little too quickly.  Neither yours nor Ben's works.  Your
 code worked fine when I was just typing in numbers for a quick test.
 
 Once I started testing with actual VIN numbers it failed.  It isn't counting
 the letters in the total count.  So 12345678901234567 succeeds but
 1M345678901234567 fails.
 
 Any suggestions?
 
 
 Rick
 
 On Wed, Jun 10, 2009 at 10:52 AM, Andy Matthews 
 li...@commadelimited.comwrote:
 
 [ ]|[a-z0-9]{17}

 Should do it...

 That basically allows for a space, or for 17 alphanumeric characters.

 -Original Message-
 From: Rick Mason [mailto:rhma...@gmail.com]
 Sent: Wednesday, June 10, 2009 9:50 AM
 To: cf-talk
 Subject: Simple regex question


 I'm in need of some regex help.  I am working with a cfinput and I need a
 pattern for regex validation that does the following:

 Field can be blank but if filled out has to be exactly 17 characters which
 are a combination of letters and numbers (VIN number)

 Know this is simple but Google seems to be failing me this morning.

 Thanks,

 Rick





 
 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323362
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Simple regex question

2009-06-10 Thread Ben Nadel

\w should handle both alpha and numeric data. I am not sure why mine was
failing.

-Ben

-- 
Ben Nadel
Adobe Community Expert
Adobe Certified Advanced ColdFusion Developer
Manager New York ColdFusion User Group
http://www.bennadel.com

Need ColdFusion Help?
http://www.bennadel.com/Ask-Ben


~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323364
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Simple regex question

2009-06-10 Thread Rick Mason

Azadi,

Figured that out while awaiting for the answer.  Reached John and Tim Farrar
via IM who suggested testing with smaller case letters.  Once we confirmed
that worked they gave me the update.  I will do further testing but that
looks like it is a winner.

Thanks all,


Rick

On Wed, Jun 10, 2009 at 12:31 PM, Azadi Saryev az...@sabai-dee.com wrote:


 PS: and Ben's needs to be adjusted to allow numbers:
 ^$|^[\w\d]{17}$


 Azadi Saryev
 Sabai-dee.com
 http://www.sabai-dee.com/


 On 10/06/2009 23:15, Rick Mason wrote:
   Andy,
 
  I jumped the gun a little too quickly.  Neither yours nor Ben's works.
  Your
  code worked fine when I was just typing in numbers for a quick test.
 
  Once I started testing with actual VIN numbers it failed.  It isn't
 counting
  the letters in the total count.  So 12345678901234567 succeeds but
  1M345678901234567 fails.
 
  Any suggestions?
 
 
  Rick
 
  On Wed, Jun 10, 2009 at 10:52 AM, Andy Matthews 
 li...@commadelimited.comwrote:
 
  [ ]|[a-z0-9]{17}
 
  Should do it...
 
  That basically allows for a space, or for 17 alphanumeric characters.
 
  -Original Message-
  From: Rick Mason [mailto:rhma...@gmail.com]
  Sent: Wednesday, June 10, 2009 9:50 AM
  To: cf-talk
  Subject: Simple regex question
 
 
  I'm in need of some regex help.  I am working with a cfinput and I need
 a
  pattern for regex validation that does the following:
 
  Field can be blank but if filled out has to be exactly 17 characters
 which
  are a combination of letters and numbers (VIN number)
 
  Know this is simple but Google seems to be failing me this morning.
 
  Thanks,
 
  Rick
 
 
 
 
 
 
 

 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323365
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Simple regex question

2009-06-10 Thread Peter Boughton

In CF regex, \w is same as [a-zA-Z0-9_]

Most other regex flavours are the same as this.

Some regex flavours also include accented characters (áéí...) in their \w 
matches.



~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323370
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Simple regex question...

2008-10-14 Thread Che Vilnonis
Morning all. I need a RegEx to strip all of the characters that appear after
the *last* dash in a string (the last dash needs to be stripped as well).
How would I do something like that? Sample data is below. Thanks!

2995,2818-5
33054--2
3320-4
7789-4(1)
3641-45-1

Che Vilnonis
Application Developer
Advertising Systems Incorporated
8470C Remington Avenue
Pennsauken, NJ 08110
p: 856.488.2211
f: 856.488.1990
www.asitv.com 




~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:313851
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: Simple regex question...

2008-10-14 Thread Adrian Lynch
ListLast(theString, -)

Adrian
Building a database of ColdFusion errors at http://cferror.org/

-Original Message-
From: Che Vilnonis [mailto:[EMAIL PROTECTED]
Sent: 14 October 2008 15:27
To: cf-talk
Subject: Simple regex question...


Morning all. I need a RegEx to strip all of the characters that appear after
the *last* dash in a string (the last dash needs to be stripped as well).
How would I do something like that? Sample data is below. Thanks!

2995,2818-5
33054--2
3320-4
7789-4(1)
3641-45-1

Che Vilnonis
Application Developer
Advertising Systems Incorporated
8470C Remington Avenue
Pennsauken, NJ 08110
p: 856.488.2211
f: 856.488.1990
www.asitv.com


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:313852
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Simple regex question...

2008-10-14 Thread Che Vilnonis
Adrian, Azadi... Thanks, that worked.  

-Original Message-
From: Azadi Saryev [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 14, 2008 10:35 AM
To: cf-talk
Subject: Re: Simple regex question...

how about just
left(string, len(string)-len(listlast(string, -))-1) ?

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/



Che Vilnonis wrote:
 Morning all. I need a RegEx to strip all of the characters that appear 
 after the *last* dash in a string (the last dash needs to be stripped as
well).
 How would I do something like that? Sample data is below. Thanks!

 2995,2818-5
 33054--2
 3320-4
 7789-4(1)
 3641-45-1

 Che Vilnonis
 Application Developer
 Advertising Systems Incorporated
 8470C Remington Avenue
 Pennsauken, NJ 08110
 p: 856.488.2211
 f: 856.488.1990
 www.asitv.com

   



~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:313856
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Simple regex question...

2008-10-14 Thread Azadi Saryev
how about just
left(string, len(string)-len(listlast(string, -))-1) ?

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/



Che Vilnonis wrote:
 Morning all. I need a RegEx to strip all of the characters that appear after
 the *last* dash in a string (the last dash needs to be stripped as well).
 How would I do something like that? Sample data is below. Thanks!

 2995,2818-5
 33054--2
 3320-4
 7789-4(1)
 3641-45-1

 Che Vilnonis
 Application Developer
 Advertising Systems Incorporated
 8470C Remington Avenue
 Pennsauken, NJ 08110
 p: 856.488.2211
 f: 856.488.1990
 www.asitv.com 

   

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:313853
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Simple regex question...

2008-10-14 Thread Peter Boughton
I need a RegEx to strip all of the characters that appear after
the *last* dash in a string (the last dash needs to be stripped as well).

To match the last dash and everything after it, you want:
-[^-]*$

So to use that to strip of that segment of the string, just do:
dashless = rereplace( dashed , '-[^-]*$' , '' ) 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:313866
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Regex question

2008-07-17 Thread Will Tomlinson
Let's say I've got a chunk of source code like so:


form name=frmLogin action=index.cfm?action=tomlinson.setTestForm 
method=post
  table width=45% align=left border=0 cellpadding=5 cellspacing=1 
class=subHeader
   tr valign=middle bgcolor=ff
td width=20% align=rightUsername/td
td width=20% align=leftinput class=req type=text name=usrID 
size=20 value=#variables.frmData.usrID# //td
   /tr
 
etc... 

So it can have almost any kind of character in it. 

Now, let's say I want to check the beginning for whatever, in this case, I want 
a match if it has a newline or carriage return at the beginning. 

(?i)^[\r\s]+[.\r\s\S]*

With this regex i'm trying to say, look for the newline/tab/c.return at the 
start of the text, and allow ANYthing afterwards. I don't care what comes 
after, allow it. 

My problem is understanding the \S (non whitespace) in the 2nd []. If I remove 
it, I don't have a match. if I include it,I DO have a match. What is in that 
chunk of text that isn't being matched, that .\r\s won't match. 

What's the best way to say look, I don't care what comes AFTER this specific 
piece of the regex that matches. Allow EVERYthing.

Make sense?

Thanks,
Will  



~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:309232
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Regex question

2008-07-17 Thread Sonny Savage
I, for one, am having trouble understanding what you're trying to
accomplish.  I could probably help you if I understood the purpose/goal of
your regular expression.

Assuming that you have this content loaded into a variable, you're not
reading a line at a time from a file, and you're wanting to find new lines
and leading white-space I'd search like this (also matches white-space at
the beginning and end of the file and at the end of a line):
((^|\s*[\r\n]+)\s|\s+$)

Disclaimer: I haven't tested the regex, but it should work as advertised.

On Thu, Jul 17, 2008 at 11:18 AM, Will Tomlinson [EMAIL PROTECTED]
wrote:

 Let's say I've got a chunk of source code like so:


 form name=frmLogin action=index.cfm?action=tomlinson.setTestForm
 method=post
  table width=45% align=left border=0 cellpadding=5 cellspacing=1
 class=subHeader
   tr valign=middle bgcolor=ff
td width=20% align=rightUsername/td
td width=20% align=leftinput class=req type=text name=usrID
 size=20 value=#variables.frmData.usrID# //td
   /tr

 etc...

 So it can have almost any kind of character in it.

 Now, let's say I want to check the beginning for whatever, in this case, I
 want a match if it has a newline or carriage return at the beginning.

 (?i)^[\r\s]+[.\r\s\S]*

 With this regex i'm trying to say, look for the newline/tab/c.return at the
 start of the text, and allow ANYthing afterwards. I don't care what comes
 after, allow it.

 My problem is understanding the \S (non whitespace) in the 2nd []. If I
 remove it, I don't have a match. if I include it,I DO have a match. What is
 in that chunk of text that isn't being matched, that .\r\s won't match.

 What's the best way to say look, I don't care what comes AFTER this
 specific piece of the regex that matches. Allow EVERYthing.

 Make sense?

 Thanks,
 Will



 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:309239
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Regex question

2008-07-17 Thread Will Tomlinson
I, for one, am having trouble understanding what you're trying to
accomplish.  I could probably help you if I understood the purpose/goal of
your regular expression.


Sonny, thanks for the help! 

I could't make that regex work for my particular problem. Probably because I 
didn't explain it well enough. It looks like it's matching if there's any 
spacing before characters on any line. 

I need to check a chunk of text and make sure it contains SOME kinda characters 
on the first line. There cannot be any empty spacing on the first line 
(c.returns,linefeeds, spaces, tabs, etc. 

The rest of the chunk can contain whatever, I don't care. 

My regex works, I just don't understand why I have to stick a \S in that 2nd 
range []. 

Thanks!

Will 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:309249
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Regex question

2008-07-17 Thread Sonny Savage
If I understand correctly, this should do what you want:
^\s+

On Thu, Jul 17, 2008 at 2:56 PM, Will Tomlinson [EMAIL PROTECTED] wrote:

 I, for one, am having trouble understanding what you're trying to
 accomplish.  I could probably help you if I understood the purpose/goal of
 your regular expression.
 

 Sonny, thanks for the help!

 I could't make that regex work for my particular problem. Probably because
 I didn't explain it well enough. It looks like it's matching if there's any
 spacing before characters on any line.

 I need to check a chunk of text and make sure it contains SOME kinda
 characters on the first line. There cannot be any empty spacing on the first
 line (c.returns,linefeeds, spaces, tabs, etc.

 The rest of the chunk can contain whatever, I don't care.

 My regex works, I just don't understand why I have to stick a \S in that
 2nd range [].

 Thanks!

 Will

 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:309255
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Another RegEx question...

2007-12-20 Thread Che Vilnonis
In a sea of data, I need to pull the first image tag. It looks like this...
img
src=http://images.craigslist.org/01010001150701030720071219cd6f3ea36b5b712d
2f00d0d9.jpg

I am using...
cfset imageLink = REReplaceNoCase(cfhttp.fileContent,
img[^]+([a-z0-9_]\.(?:jpg|jpeg|gif|png))[^]*, , ONE)

But it does not work. Can anyone help? Thanks, Che


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295205
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Another RegEx question...

2007-12-20 Thread Todd
listLast(URL,'/') ?  You're just complicating something simple with Regex
here in this case.

On Dec 20, 2007 2:55 PM, Che Vilnonis [EMAIL PROTECTED] wrote:

 In a sea of data, I need to pull the first image tag. It looks like
 this...
 img
 src=
 http://images.craigslist.org/01010001150701030720071219cd6f3ea36b5b712d
 2f00d0d9.jpg

 I am using...
 cfset imageLink = REReplaceNoCase(cfhttp.fileContent,
 img[^]+([a-z0-9_]\.(?:jpg|jpeg|gif|png))[^]*, , ONE)

 But it does not work. Can anyone help? Thanks, Che




~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295206
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: Another RegEx question...

2007-12-20 Thread Che Vilnonis
Todd, not sure that that would work. If you look at my code, I am cfhttp-ing
a page and searching for the first image tag. I simply gave an example of
the format of the img src in the returned HTML. RegEx would be best for
that, right? 

-Original Message-
From: Todd [mailto:[EMAIL PROTECTED] 
Sent: Thursday, December 20, 2007 2:58 PM
To: CF-Talk
Subject: Re: Another RegEx question...

listLast(URL,'/') ?  You're just complicating something simple with Regex
here in this case.

On Dec 20, 2007 2:55 PM, Che Vilnonis [EMAIL PROTECTED] wrote:

 In a sea of data, I need to pull the first image tag. It looks like 
 this...
 img
 src=
 http://images.craigslist.org/01010001150701030720071219cd6f3ea36b5b712
 d
 2f00d0d9.jpg

 I am using...
 cfset imageLink = REReplaceNoCase(cfhttp.fileContent,
 img[^]+([a-z0-9_]\.(?:jpg|jpeg|gif|png))[^]*, , ONE)

 But it does not work. Can anyone help? Thanks, Che






~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295207
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Another RegEx question...

2007-12-20 Thread Ben Doom
The first thing I see is that you are only allowing for single-character 
names.  You don't have a + or * (+ would be better) after [a-z0-9_]. 
There may be more, but that's what I see at first glance.

--Ben Doom


Che Vilnonis wrote:
 In a sea of data, I need to pull the first image tag. It looks like this...
 img
 src=http://images.craigslist.org/01010001150701030720071219cd6f3ea36b5b712d
 2f00d0d9.jpg
 
 I am using...
 cfset imageLink = REReplaceNoCase(cfhttp.fileContent,
 img[^]+(\.(?:jpg|jpeg|gif|png))[^]*, , ONE)
 
 But it does not work. Can anyone help? Thanks, Che
 
 
 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295208
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Another RegEx question...

2007-12-20 Thread Josh Nathanson
I think you need ReFindNoCase, otherwise it will return empty string.

-- Josh

- Original Message - 
From: Todd [EMAIL PROTECTED]
To: CF-Talk cf-talk@houseoffusion.com
Sent: Thursday, December 20, 2007 11:58 AM
Subject: Re: Another RegEx question...


 listLast(URL,'/') ?  You're just complicating something simple with Regex
 here in this case.

 On Dec 20, 2007 2:55 PM, Che Vilnonis [EMAIL PROTECTED] wrote:

 In a sea of data, I need to pull the first image tag. It looks like
 this...
 img
 src=
 http://images.craigslist.org/01010001150701030720071219cd6f3ea36b5b712d
 2f00d0d9.jpg

 I am using...
 cfset imageLink = REReplaceNoCase(cfhttp.fileContent,
 img[^]+([a-z0-9_]\.(?:jpg|jpeg|gif|png))[^]*, , ONE)

 But it does not work. Can anyone help? Thanks, Che




 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295210
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Another RegEx question...

2007-12-20 Thread Claude Schneegans
 I am cfhttp-ing a page and searching for the first image tag.

This is a job for CF_REextract :
http://www.contentbox.com/claude/customtags/REextract/testREextract.cfm

You can even test it on line :
1) set INPUTMODE = to http
2) go to 
http://www.contentbox.com/claude/customtags/REextract/testingREextract.cfm
3) enter src= in RE1
4) enter  in RE2
5) set EXTRACT = to first
6) enter the address of your page in the URL field
click on Test, ... et voilà !

-- 
___
REUSE CODE! Use custom tags;
See http://www.contentbox.com/claude/customtags/tagstore.cfm
(Please send any spam to this address: [EMAIL PROTECTED])
Thanks.



~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295212
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: Another RegEx question...

2007-12-20 Thread Che Vilnonis
Claude, that brings back the javascript script tag. Neat custom tag, I just
want the RegEx though.

-Original Message-
From: Claude Schneegans [mailto:[EMAIL PROTECTED] 
Sent: Thursday, December 20, 2007 3:36 PM
To: CF-Talk
Subject: Re: Another RegEx question...

 I am cfhttp-ing a page and searching for the first image tag.

This is a job for CF_REextract :
http://www.contentbox.com/claude/customtags/REextract/testREextract.cfm

You can even test it on line :
1) set INPUTMODE = to http
2) go to
http://www.contentbox.com/claude/customtags/REextract/testingREextract.cfm
3) enter src= in RE1
4) enter  in RE2
5) set EXTRACT = to first
6) enter the address of your page in the URL field click on Test, ... et
voilà !

--
___
REUSE CODE! Use custom tags;
See http://www.contentbox.com/claude/customtags/tagstore.cfm
(Please send any spam to this address: [EMAIL PROTECTED]) Thanks.





~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295213
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Another RegEx question...

2007-12-20 Thread Claude Schneegans
 Claude, that brings back the javascript script tag

Ah ok, then you have to include the img tag in the RE1 expression.

 I just want the RegEx though.

I wrote this tag because it is sometimes much easier to find what's 
between two very simple expressions
than to describe what you want in only one more complicated expression,
and I was tired of designing complex expressions.

So now, do not count on me to do it for others ;-)

-- 
___
REUSE CODE! Use custom tags;
See http://www.contentbox.com/claude/customtags/tagstore.cfm
(Please send any spam to this address: [EMAIL PROTECTED])
Thanks.


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295219
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Another RegEx question...

2007-12-20 Thread s. isaac dealey
 cfset imageLink = REReplaceNoCase(cfhttp.fileContent,
 img[^]+([a-z0-9_]\.(?:jpg|jpeg|gif|png))[^]*, , ONE)

In addition to Ben's comment, it doesn't look like you're finding the
beginning of the src attribute, see: 

img[^]+ and then straight into the regex for the url ... so there's no
mention of src= ... there's also no allowance for the protocol (https?://)
and the : in (?:jpg| seems erroneous... 

I might suggest a slightly different tac ... instead of trying to get
it with one expression, how about this? 

cfset img = rereplacenocase(cfhttp.filecontent,
^.*?(img[^]+).*$,\1)
cfset img = rereplace(img,[^/],/)
cfset img = xmlparse(img) /
cfset img = img.img.xmlAttributes.src

Usually an image tag doesn't contain any characters that aren't xml safe,
since it's just got the src (no url parameters usually), class, style
and potentially an alt or title tag. It's really the alt or title tag
that might potentially have non-xml safe characters, but still not very
often. The 2nd rereplace checks to see if the image has an xml closing
and if not then it closes it so that the xmlparse() will work properly.
Of course, if you don't want to do the xml thing, once you have the tag
by itself, then it's a lot easier to just get the src attribute via
regex,i.e. 

cfset img = rereplace(img,^.*src=([^]+).*$,\1)

Although that runs some other potential risks of getting content from a
site that's using xml where the author used single-quotes instead of
doublequotes (minor change to the above regex I admit). I'm just saying,
6 of 1, 1/2-doz of the other there are a number of potential points of
failure either way. 

hth,
ike

-- 
s. isaac dealey  ^  new epoch
 isn't it time for a change? 
 ph: 503.236.3691

http://onTap.riaforge.org



~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295227
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: This is a good one - another Regex question

2007-07-24 Thread Jide Aliu
Jide, why do you want to do this again??  What precisely are you gaining by 
moving 
the closing paragraph tag outside the UL?

Hi Mark,

I've been away for a couple of days, I've just seen your post. The long and 
short of it is that we have a client that has some sort of data feed process 
that requires that any given content that goes into their database has to be 
sorrounded by p tag. Unfortunately I have not influence on their data 
submission process. So I've had to submit sets of xml to them filled with the 
invalid HTML.

Hope it makes sense :-) cos I couldn't and still can't make any sense of it 
myself.

Jide. 

~|
ColdFusion 8 beta - Build next generation apps
today, with easy PDF and Ajax features - download now
http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:284477
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: This is a good one - another Regex question

2007-07-23 Thread Mark Henderson
Claude Schneegans wrote:
 
 IMO, the format you are trying to modify is by far more correct than the 
 result you are trying to attempt.

Agreed. And the question, although once posed, still beckons - Jide, why 
do you want to do this again??  What precisely are you gaining by moving 
the closing paragraph tag outside the UL? I'm not going to even presume 
I know the answer, although I have my suspicions!

Mark


~|
Get involved in the latest ColdFusion discussions, product
development sharing, and articles on the Adobe Labs wiki.
http://labs/adobe.com/wiki/index.php/ColdFusion_8

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:284348
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: This is a good one - another Regex question

2007-07-23 Thread Mark Henderson
Jide Aliu wrote:
 Thanks for your reply Claude. I know that formatting wise it's madness to 
 have p tags round ul tag, but the problem we are having is that we are 
 suppplying xml data to a vendor for some reason their system won't accept 
 ul listing without p tags round them. That is my dilema. I'll have a look 
 at CF_Extract and see if it's any good to me. 

Duh, so much for sorting by thread. Scratch my last question sorry, as 
you answered it days ago.

~|
Download the latest ColdFusion 8 utilities including Report Builder,
plug-ins for Eclipse and Dreamweaver updates.
http;//www.adobe.com/cfusion/entitlement/index.cfm?e=labs%5adobecf8%5Fbeta

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:284349
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: This is a good one - another Regex question

2007-07-21 Thread Jide Aliu
Thanks for your help Claude, it has really open my eyes to Regex. Not sure what 
it can't do as far as text manipulation goes :-)

~|
ColdFusion MX7 by Adobe®
Dyncamically transform webcontent into Adobe PDF with new ColdFusion MX7. 
Free Trial. http://www.adobe.com/products/coldfusion?sdid=RVJV

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:284298
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: This is a good one - another Regex question

2007-07-21 Thread Claude Schneegans
 Not sure what it can't do as far as text manipulation goes

Not really sure about something regexp can't do.
The problem is generally to find the right one ;-)

-- 
___
REUSE CODE! Use custom tags;
See http://www.contentbox.com/claude/customtags/tagstore.cfm
(Please send any spam to this address: [EMAIL PROTECTED])
Thanks.


~|
Macromedia ColdFusion MX7
Upgrade to MX7  experience time-saving features, more productivity.
http://www.adobe.com/products/coldfusion?sdid=RVJW

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:284314
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: This is a good one - another Regex question

2007-07-20 Thread Jide Aliu
Thanks for your reply Claude. I know that formatting wise it's madness to have 
p tags round ul tag, but the problem we are having is that we are 
suppplying xml data to a vendor for some reason their system won't accept ul 
listing without p tags round them. That is my dilema. I'll have a look at 
CF_Extract and see if it's any good to me.

Thanks


~|
ColdFusion MX7 by Adobe®
Dyncamically transform webcontent into Adobe PDF with new ColdFusion MX7. 
Free Trial. http://www.adobe.com/products/coldfusion?sdid=RVJV

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:284176
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: This is a good one - another Regex question

2007-07-20 Thread Jide Aliu
Incidentally Claude, how would CF_Extract work in solving the problem. If I'm 
100% sure that it'll work, I'll get it now!

Thanks again

~|
CF 8 – Scorpio beta now available, 
easily build great internet experiences – Try it now on Labs
http://www.adobe.com/cfusion/entitlement/index.cfm?e=labs_adobecf8_beta

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:284177
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: This is a good one - another Regex question

2007-07-20 Thread Claude Schneegans
 Incidentally Claude, how would CF_Extract work in solving the problem.

I cannot be 100% sure myself if I don't have a sample of the file and 
the work to do actually,
but apparently your problem it a parsing issue, and I've designed this 
tag to help to solve
parsing problems.

The basic principle with CF_REextract is that it allows you to find 
special areas in your file
by specifying two regexp for areas that surround the areas you want, and 
sometimes this is much
easier than describing the area itself in one regexp.

-- 
___
REUSE CODE! Use custom tags;
See http://www.contentbox.com/claude/customtags/tagstore.cfm
(Please send any spam to this address: [EMAIL PROTECTED])
Thanks.


~|
ColdFusion MX7 and Flex 2 
Build sales  marketing dashboard RIA’s for your business. Upgrade now
http://www.adobe.com/products/coldfusion/flex2?sdid=RVJT

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:284189
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: This is a good one - another Regex question

2007-07-20 Thread Jide Aliu
I cannot be 100% sure myself if I don't have a sample of the file and 
the work to do actually

pstrongJedi Knight? Big paragraph sometime and large chunk of text 
sometimes /strong/p
ul
lisfsdfsdfs dfsdfsdfsdf/li
lisdfsddfsdf sdfsdf/li
lisdfsddfsdf sdfsdf/li
/ul

Honestly this is typical data all that is needed is to shipft the closing p tag 
to right after the closing /p tag, in all instance this occurs in a document. 
To look like below.
pstrongJedi Knight? Big paragraph sometime and large chunk of text 
sometimes /strong
ul
lisfsdfsdfs dfsdfsdfsdf/li
lisdfsddfsdf sdfsdf/li
lisdfsddfsdf sdfsdf/li
/ul
/p




~|
Create Web Applications With ColdFusion MX7  Flex 2. 
Build powerful, scalable RIAs. Free Trial
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJS 

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:284202
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: This is a good one - another Regex question

2007-07-20 Thread Claude Schneegans
If the whole file is like this, henestly you don't really need 
CF_REextract for this.
1º replace all occurences of /p[[:space:]]ul by #chr(13)##chr(10)#ul
2º replace all /ul with /ul#chr(13)##chr(10)#/p

You don't even need regexp for 2º

Now, if you have UL blocs with no preceding P, or multi-level ULs, 
then it's another story.
-- 

___
REUSE CODE! Use custom tags;
See http://www.contentbox.com/claude/customtags/tagstore.cfm
(Please send any spam to this address: [EMAIL PROTECTED])
Thanks.



~|
Macromedia ColdFusion MX7
Upgrade to MX7  experience time-saving features, more productivity.
http://www.adobe.com/products/coldfusion?sdid=RVJW

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:284205
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: This is a good one - another Regex question

2007-07-20 Thread Jide Aliu
Thanks Claude - I'll try this and let  you know if it works.

~|
Create Web Applications With ColdFusion MX7  Flex 2. 
Build powerful, scalable RIAs. Free Trial
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJS 

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:284206
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: This is a good one - another Regex question

2007-07-20 Thread Jide Aliu
Hi Claude - I tried the implementation you suggested, the second half worked 
fine all/ul are replaced by /ul/p but absolutely nothing happened the top 
half the opening pblah blah/p ulsdfsd remains the same.

Am I doing something wrong? Please see the code below

cfset formatText= rePlace(rawText, /p[[:space:]]ul, 
#chr(13)##chr(10)#ul,ALL)
cfset formatText= rePlace(formatText, /ul, 
/ul#chr(13)##chr(10)#/p,ALL)

1º replace all occurences of /p[[:space:]]ul by #chr(13)##chr(10)#ul
2º replace all /ul with /ul#chr(13)##chr(10)#/p

You don't even need regexp for 2º

Now, if you have UL blocs with no preceding P, or multi-level ULs, 
then it's another story.

~|
CF 8 – Scorpio beta now available, 
easily build great internet experiences – Try it now on Labs
http://www.adobe.com/cfusion/entitlement/index.cfm?e=labs_adobecf8_beta

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:284275
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: This is a good one - another Regex question

2007-07-20 Thread Ben Doom
You need an asterisk after [[:space:]].

Try that on for size.

--Ben Doom

Jide Aliu wrote:
 Hi Claude - I tried the implementation you suggested, the second half worked 
 fine all/ul are replaced by /ul/p but absolutely nothing happened the 
 top half the opening pblah blah/p ulsdfsd remains the same.
 
 Am I doing something wrong? Please see the code below
 
 cfset formatText= rePlace(rawText, /p[[:space:]]ul, 
 #chr(13)##chr(10)#ul,ALL)
 cfset formatText= rePlace(formatText, /ul, 
 /ul#chr(13)##chr(10)#/p,ALL)
 
 1º replace all occurences of /p[[:space:]]ul by #chr(13)##chr(10)#ul
 2º replace all /ul with /ul#chr(13)##chr(10)#/p

 You don't even need regexp for 2º

 Now, if you have UL blocs with no preceding P, or multi-level ULs, 
 then it's another story.
 
 

~|
ColdFusion MX7 and Flex 2 
Build sales  marketing dashboard RIA’s for your business. Upgrade now
http://www.adobe.com/products/coldfusion/flex2?sdid=RVJT

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:284276
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: This is a good one - another Regex question

2007-07-20 Thread Jide Aliu
You need an asterisk after [[:space:]].


Fantastic dude! That did the trick. Thanks, I'm off now to drop everything off 
into an xml document.

~|
Deploy Web Applications Quickly across the enterprise with ColdFusion MX7  
Flex 2
Free Trial 
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:284279
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: This is a good one - another Regex question

2007-07-20 Thread Claude Schneegans
 cfset formatText= rePlace(rawText, /p[[:space:]]ul, 
#chr(13)##chr(10)#ul,ALL)

This one uses a regexp, so you should rather use REReplace()

cfset formatText= REreplace(rawText, /p[[:space:]]ul, 
#chr(13)##chr(10)#ul,ALL)


-- 
___
REUSE CODE! Use custom tags;
See http://www.contentbox.com/claude/customtags/tagstore.cfm
(Please send any spam to this address: [EMAIL PROTECTED])
Thanks.


~|
ColdFusion MX7 and Flex 2 
Build sales  marketing dashboard RIA’s for your business. Upgrade now
http://www.adobe.com/products/coldfusion/flex2?sdid=RVJT

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:284292
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: This is a good one - another Regex question

2007-07-20 Thread Claude Schneegans
 You need an asterisk after [[:space:]]

Also. ;-)

-- 
___
REUSE CODE! Use custom tags;
See http://www.contentbox.com/claude/customtags/tagstore.cfm
(Please send any spam to this address: [EMAIL PROTECTED])
Thanks.


~|
Upgrade to Adobe ColdFusion MX7
Experience Flex 2  MX7 integration  create powerful cross-platform RIAs
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJQ 

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:284293
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


This is a good one - another Regex question

2007-07-19 Thread Jide Aliu
I have a body of text, within that text are random ul tags preceded by 
ptext/p, example below;

pBody of text loads of it, sometimes just a one liner and it ends here/p

ul
 liblurb of text one/li
 liblurb of text two/li
 liblurb of text three/li
/ul

pAnother of body text here/p

ul
 liNew list 1/li
 liNew list 2 /li
/ul

What I want to be able to do is wherever i have a preceding body of text before 
set of ul tags, the p tag must go round the ul tags like so;

pBody of text loads of it, sometimes just a one liner and it ends here

ul
 liblurb of text one/li
 liblurb of text two/li
 liblurb of text three/li
/ul
/p

pAnother of body text here/p

ul
 liNew list 1/li
 liNew list 2 /li
/ul

Is this at all possible?

Many thanks.

~|
ColdFusion MX7 and Flex 2 
Build sales  marketing dashboard RIA’s for your business. Upgrade now
http://www.adobe.com/products/coldfusion/flex2?sdid=RVJT

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:284148
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: This is a good one - another Regex question

2007-07-19 Thread Jide Aliu
Sorry just a quick correction below, the p tag must always encapsulate the 
next piece of ul tag just after it and closes at the end of the /ul/ptag;


 pBody of text loads of it, sometimes just a one liner and it ends 
 here
 
 ul
 
 liblurb of text one/li
 
 liblurb of text two/li

 liblurb of text three/li
 /ul
 /p
 
 pAnother of body text here
 
 ul
 
 liNew list 1/li
 
 liNew list 2 /li
 /ul
/p
 I have a body of text, within that text are random ul tags preceded 
 by ptext/p, example below;
 
 pBody of text loads of it, sometimes just a one liner and it ends 
 here/p
 
 ul
 
 liblurb of text one/li
 
 liblurb of text two/li
 
 liblurb of text three/li
 /ul
 
 pAnother of body text here/p
 
 ul
 
 liNew list 1/li
 
 liNew list 2 /li
 /ul
 
 What I want to be able to do is wherever i have a preceding body of 
 text before set of ul tags, the p tag must go round the ul tags 
 like so;
 
 pBody of text loads of it, sometimes just a one liner and it ends 
 here
 
 ul
 
 liblurb of text one/li
 
 liblurb of text two/li
 
 liblurb of text three/li
 /ul
 /p
 
 pAnother of body text here/p
 
 ul
 
 liNew list 1/li
 
 liNew list 2 /li
 /ul
 
 Is this at all possible?
 
 Many thanks.

~|
Upgrade to Adobe ColdFusion MX7
The most significant release in over 10 years. Upgrade  see new features.
http://www.adobe.com/products/coldfusion?sdid=RVJR

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:284153
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: This is a good one - another Regex question

2007-07-19 Thread Christopher Jordan
You know who you ought to ask about regex stuff is my man Steven Levithan
over at Flagrant Badassery http://blog.stevenlevithan.com/. The dude is in
love with regular expressions.

Chris

http://blog.stevenlevithan.com/On 7/19/07, Jide Aliu 
[EMAIL PROTECTED] wrote:

 I have a body of text, within that text are random ul tags preceded by
 ptext/p, example below;

 pBody of text loads of it, sometimes just a one liner and it ends
 here/p

 ul
 liblurb of text one/li
 liblurb of text two/li
 liblurb of text three/li
 /ul

 pAnother of body text here/p

 ul
 liNew list 1/li
 liNew list 2 /li
 /ul

 What I want to be able to do is wherever i have a preceding body of text
 before set of ul tags, the p tag must go round the ul tags like so;

 pBody of text loads of it, sometimes just a one liner and it ends here

 ul
 liblurb of text one/li
 liblurb of text two/li
 liblurb of text three/li
 /ul
 /p

 pAnother of body text here/p

 ul
 liNew list 1/li
 liNew list 2 /li
 /ul

 Is this at all possible?

 Many thanks.

 

~|
Create Web Applications With ColdFusion MX7  Flex 2. 
Build powerful, scalable RIAs. Free Trial
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJS 

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:284152
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: This is a good one - another Regex question

2007-07-19 Thread Claude Schneegans
  the p tag must go round the ul tags like so

Sorry, but I don't really see the point here:
The P tag is supposed to be applied to a paragraph.
The UL and LI break that paragraph anyway, so that, unless the closing 
/P is right after the end of the paragraph,
its presence after the closing /UL is not only redundant, but it is 
logically wrong: there is no paragraph to close here.

IMO, the format you are trying to modify is by far more correct than the 
result you are trying to attempt.

Any way, I don't think this would be very easy with straight regexp, I 
would rather use CF_REextract,
a much more powerful tool for parsing ;-)

See: http://www.contentbox.com/claude/customtags/REextract/testREextract.cfm

-- 
___
REUSE CODE! Use custom tags;
See http://www.contentbox.com/claude/customtags/tagstore.cfm
(Please send any spam to this address: [EMAIL PROTECTED])
Thanks.


~|
Macromedia ColdFusion MX7
Upgrade to MX7  experience time-saving features, more productivity.
http://www.adobe.com/products/coldfusion?sdid=RVJW

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:284160
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Yet another regex question

2007-05-16 Thread Peterson, Chris
I am trying to write a regex for IsapiRewrite4.

I would like any url that is directly to the root (ie www.site.com) or
to ( www.site.com/index.cfm ) with 3 required paramaters after it, and
additional paramaters possibly.  So:

www.site.com/user/user/list/  would change to
www.site.com/index.cfm?event=user.user.list
www.site.com/index.cfm/user/user/list/ would change to
www.site.com/index.cfm?event=user.user.list
www.site.com/article/list/details/My-Big-Fat-Code-Monkey/Loves-Cheese
would change to
www.site.com/index.cfm?event=article.list.details?vars=My-Big-Fat-Code-M
onkey|Loves-Cheese


Here is what I was working with and getting nowhere:

[IsapiRewrite4.ini file]

RewriteLog  d:\temp\iirfLog.out
RewriteLogLevel 5

IterationLimit 0
RewriteRule ^/index\.cfm(/.+/.+/.*\?.+\..*)$ /index.cfm?event=$1.$2.$3


I am trying to get this to work properly using IsapiRewrite4, but a) the
debug output is not very useful (bad expression, loading default) and
when I do get it to run, all I get is the default model-glue page.  Has
anyone else done this? Thanks for any help or direction you can give me!

Chris Peterson

~|
ColdFusion MX7 by Adobe®
Dyncamically transform webcontent into Adobe PDF with new ColdFusion MX7. 
Free Trial. http://www.adobe.com/products/coldfusion?sdid=RVJV

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:278306
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Yet another regex question

2007-05-16 Thread Jon Clausen
Chris,

Check out Coldcourse (http://coldcourse.riaforge.com)   It has the  
IsapiRewrite4 .ini file in there and allows you to specify a  
controller.delimiter which should work for your dot notation for  
event handlers.   You can also specify courses manually which will  
allow you to make something like:

www.site.com/user/list/

route to

www.site.com/index.cfm?event=user.user.anyotheruser.callingallusers.list


HTH,

Jon

On May 16, 2007, at 2:43 PM, Peterson, Chris wrote:

 I am trying to write a regex for IsapiRewrite4.

 I would like any url that is directly to the root (ie www.site.com) or
 to ( www.site.com/index.cfm ) with 3 required paramaters after it, and
 additional paramaters possibly.  So:

 www.site.com/user/user/list/  would change to
 www.site.com/index.cfm?event=user.user.list
 www.site.com/index.cfm/user/user/list/ would change to
 www.site.com/index.cfm?event=user.user.list
 www.site.com/article/list/details/My-Big-Fat-Code-Monkey/Loves-Cheese
 would change to
 www.site.com/index.cfm?event=article.list.details?vars=My-Big-Fat- 
 Code-M
 onkey|Loves-Cheese


 Here is what I was working with and getting nowhere:

 [IsapiRewrite4.ini file]

 RewriteLog  d:\temp\iirfLog.out
 RewriteLogLevel 5

 IterationLimit 0
 RewriteRule ^/index\.cfm(/.+/.+/.*\?.+\..*)$ /index.cfm?event=$1.$2.$3


 I am trying to get this to work properly using IsapiRewrite4, but  
 a) the
 debug output is not very useful (bad expression, loading default) and
 when I do get it to run, all I get is the default model-glue page.   
 Has
 anyone else done this? Thanks for any help or direction you can  
 give me!

 Chris Peterson

 

~|
ColdFusion MX7 and Flex 2 
Build sales  marketing dashboard RIA’s for your business. Upgrade now
http://www.adobe.com/products/coldfusion/flex2?sdid=RVJT

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:278312
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: Yet another regex question

2007-05-16 Thread Peterson, Chris
Jon,

That is funny, because I had just downloaded Coldcourse and was trying
to modify the regex in the file it had to suite my needs.  I am a
Model-Glue newbie, so I wasn't quite ready to add another layer of
complexity on top of MG:U, but I may have to take a dive into it =)

Thanks!

Chris  

-Original Message-
From: Jon Clausen [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 16, 2007 2:52 PM
To: CF-Talk
Subject: Re: Yet another regex question

Chris,

Check out Coldcourse (http://coldcourse.riaforge.com)   It has the  
IsapiRewrite4 .ini file in there and allows you to specify a
controller.delimiter which should work for your dot notation for  
event handlers.   You can also specify courses manually which will  
allow you to make something like:

www.site.com/user/list/

route to

www.site.com/index.cfm?event=user.user.anyotheruser.callingallusers.list


HTH,

Jon

~|
Upgrade to Adobe ColdFusion MX7
The most significant release in over 10 years. Upgrade  see new features.
http://www.adobe.com/products/coldfusion?sdid=RVJR

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:278314
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Yet another regex question

2007-05-16 Thread Jon Clausen
Chris,

It's what I use on one of my personal sites (http://spotstor.com) and  
I also use it for a non-MG site for a client.  It's a pretty  
straightforward setup. Just throw the include for coldcourse.cfm  
right after the cfapplication tag and then you can add the  
following in onRequestStart:

cfset arguments.event.setValue(myself,)

That will allow  ModelGlue to handle any result redirects properly.
With dot delimiters in events you may need to add something like the  
following in the onQueueComplete method:

cfset arguments.event.setValue(event,replace 
(arguments.event.getValue(event),.,/,ALL)

That way you can use #viewstate.getValue(event)# in your views and  
still have the URLs formatted the way you want.

HTH,
Jon

On May 16, 2007, at 3:00 PM, Peterson, Chris wrote:

 Jon,

 That is funny, because I had just downloaded Coldcourse and was trying
 to modify the regex in the file it had to suite my needs.  I am a
 Model-Glue newbie, so I wasn't quite ready to add another layer of
 complexity on top of MG:U, but I may have to take a dive into it =)

 Thanks!

 Chris

 -Original Message-
 From: Jon Clausen [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, May 16, 2007 2:52 PM
 To: CF-Talk
 Subject: Re: Yet another regex question

 Chris,

 Check out Coldcourse (http://coldcourse.riaforge.com)   It has the
 IsapiRewrite4 .ini file in there and allows you to specify a
 controller.delimiter which should work for your dot notation for
 event handlers.   You can also specify courses manually which will
 allow you to make something like:

 www.site.com/user/list/

 route to

 www.site.com/index.cfm? 
 event=user.user.anyotheruser.callingallusers.list


 HTH,

 Jon

 

~|
ColdFusion MX7 and Flex 2 
Build sales  marketing dashboard RIA’s for your business. Upgrade now
http://www.adobe.com/products/coldfusion/flex2?sdid=RVJT

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:278333
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


SOT: Javascript regex question...

2007-05-01 Thread Andy Matthews
I'm working on this myself, but wanted to throw it to the list in case
someone knew it right off.
 
I have a string:
optionselect a make/optionoption value=Honda selectedHonda/option
 
The length of this string might vary, but I need to get the string inside
the FIRST value=get this string.
 
I know the starting char by doing this: str.indexOf(''); which returns 44,
so I know to start counting at 45, but how do I know to stop counting at
char 50 (in this case)? So basically I need to get the FIRST occurrence of
value= and get what's between the quotes.
 

 
Andy Matthews
Senior Coldfusion Developer

Office:  877.707.5467 x747
Direct:  615.627.9747
Fax:  615.467.6249
[EMAIL PROTECTED]
www.dealerskins.com http://www.dealerskins.com/ 
 


~|
Create robust enterprise, web RIAs.
Upgrade  integrate Adobe Coldfusion MX7 with Flex 2
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:276675
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: Javascript regex question...

2007-05-01 Thread Ben Nadel
Probably not the best solution, but a very quick one (to come up with,
not processing time):

ListGetAt( YOUR_CONTENT, 2,  )

Treat the content a quote-delimited list. Then the second list item is
the first value. 


..
Ben Nadel
Certified Advanced ColdFusion MX7 Developer
www.bennadel.com
 
Need ColdFusion Help?
www.bennadel.com/ask-ben/

-Original Message-
From: Andy Matthews [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 01, 2007 3:38 PM
To: CF-Talk
Subject: SOT: Javascript regex question...

I'm working on this myself, but wanted to throw it to the list in case
someone knew it right off.
 
I have a string:
optionselect a make/optionoption value=Honda
selectedHonda/option
 
The length of this string might vary, but I need to get the string
inside the FIRST value=get this string.
 
I know the starting char by doing this: str.indexOf(''); which returns
44, so I know to start counting at 45, but how do I know to stop
counting at char 50 (in this case)? So basically I need to get the FIRST
occurrence of value= and get what's between the quotes.
 

 
Andy Matthews
Senior Coldfusion Developer

Office:  877.707.5467 x747
Direct:  615.627.9747
Fax:  615.467.6249
[EMAIL PROTECTED]
www.dealerskins.com http://www.dealerskins.com/ 
 




~|
Create Web Applications With ColdFusion MX7  Flex 2. 
Build powerful, scalable RIAs. Free Trial
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJS 

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:276678
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: Javascript regex question...

2007-05-01 Thread Andy Matthews
Found it. In case anyone's interested. This is what I came up with:

str = 'optionselect a make/optionoption value=Honda
selectedHonda/optionoption value=AcuraAcura/option';
re = /value=(\w+)/i;
found = str.match(re);

alert(found): returns value=Honda,Honda
alert(found[1]): returns Honda 

-Original Message-
From: Andy Matthews [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 01, 2007 2:38 PM
To: CF-Talk
Subject: SOT: Javascript regex question...

I'm working on this myself, but wanted to throw it to the list in case
someone knew it right off.
 
I have a string:
optionselect a make/optionoption value=Honda selectedHonda/option
 
The length of this string might vary, but I need to get the string inside
the FIRST value=get this string.
 
I know the starting char by doing this: str.indexOf(''); which returns 44,
so I know to start counting at 45, but how do I know to stop counting at
char 50 (in this case)? So basically I need to get the FIRST occurrence of
value= and get what's between the quotes.
 

 
Andy Matthews
Senior Coldfusion Developer

Office:  877.707.5467 x747
Direct:  615.627.9747
Fax:  615.467.6249
[EMAIL PROTECTED]
www.dealerskins.com http://www.dealerskins.com/ 
 




~|
Upgrade to Adobe ColdFusion MX7
Experience Flex 2  MX7 integration  create powerful cross-platform RIAs
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJQ 

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:276681
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Javascript regex question...

2007-05-01 Thread Ben Nadel
Oh whoops. Didn't realize you were in javascript. 


..
Ben Nadel
Certified Advanced ColdFusion MX7 Developer
www.bennadel.com
 
Need ColdFusion Help?
www.bennadel.com/ask-ben/

-Original Message-
From: Andy Matthews [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 01, 2007 3:57 PM
To: CF-Talk
Subject: RE: Javascript regex question...

Found it. In case anyone's interested. This is what I came up with:

str = 'optionselect a make/optionoption value=Honda
selectedHonda/optionoption value=AcuraAcura/option';
re = /value=(\w+)/i;
found = str.match(re);

alert(found): returns value=Honda,Honda
alert(found[1]): returns Honda 

~|
Upgrade to Adobe ColdFusion MX7
The most significant release in over 10 years. Upgrade  see new features.
http://www.adobe.com/products/coldfusion?sdid=RVJR

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:276686
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: Javascript regex question...

2007-05-01 Thread Andy Matthews
Yeah...

The Javascript regex question wasn't that obvious. Sorry.

;) 

-Original Message-
From: Ben Nadel [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 01, 2007 3:08 PM
To: CF-Talk
Subject: RE: Javascript regex question...

Oh whoops. Didn't realize you were in javascript. 


...
Ben Nadel
Certified Advanced ColdFusion MX7 Developer www.bennadel.com
 
Need ColdFusion Help?
www.bennadel.com/ask-ben/

-Original Message-
From: Andy Matthews [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 01, 2007 3:57 PM
To: CF-Talk
Subject: RE: Javascript regex question...

Found it. In case anyone's interested. This is what I came up with:

str = 'optionselect a make/optionoption value=Honda
selectedHonda/optionoption value=AcuraAcura/option';
re = /value=(\w+)/i;
found = str.match(re);

alert(found): returns value=Honda,Honda
alert(found[1]): returns Honda 



~|
Macromedia ColdFusion MX7
Upgrade to MX7  experience time-saving features, more productivity.
http://www.adobe.com/products/coldfusion?sdid=RVJW

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:276693
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: Javascript regex question...

2007-05-01 Thread Ben Nadel
Oh, THAT Javascript :) 



..
Ben Nadel
Certified Advanced ColdFusion MX7 Developer
www.bennadel.com
 
Need ColdFusion Help?
www.bennadel.com/ask-ben/

-Original Message-
From: Andy Matthews [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 01, 2007 4:50 PM
To: CF-Talk
Subject: RE: Javascript regex question...

Yeah...

The Javascript regex question wasn't that obvious. Sorry.

;) 

~|
Create robust enterprise, web RIAs.
Upgrade  integrate Adobe Coldfusion MX7 with Flex 2
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:276704
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


  1   2   3   >