looking for a regex

2004-08-10 Thread Ryan Mitchell
Hello

I'm looking for a regex that will identify items in a template file 
along the lines of

{item}
{item.subitem}
{item.subitem1.subitem2}

etc...

But that will not pull up _javascript_ functions!!

Any guru's out there who can help?

Thanks,
Ryan
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




RE: looking for a regex

2004-08-10 Thread Pascal Peters
\{\w+(\.\w+)*\}

What do you mean by js functions?

Pascal

 -Original Message-
 From: Ryan Mitchell [mailto:[EMAIL PROTECTED]
 Sent: 10 August 2004 16:44
 To: CF-Talk
 Subject: looking for a regex
 
 Hello
 
 I'm looking for a regex that will identify items in a template file
 along the lines of
 
 {item}
 {item.subitem}
 {item.subitem1.subitem2}
 
 etc...
 
 But that will not pull up _javascript_ functions!!
 
 Any guru's out there who can help?
 
 Thanks,
 Ryan
 

 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




RE: looking for a regex

2004-08-10 Thread S . Isaac Dealey
he means this regex will return things like window.location.replace()
or document.write() -- he wants to exclude those.

 \{\w+(\.\w+)*\}

 What do you mean by js functions?

 Pascal

 -Original Message-
 From: Ryan Mitchell [mailto:[EMAIL PROTECTED]
 Sent: 10 August 2004 16:44
 To: CF-Talk
 Subject: looking for a regex

 Hello

 I'm looking for a regex that will identify items in a
 template file
 along the lines of

 {item}
 {item.subitem}
 {item.subitem1.subitem2}

 etc...

 But that will not pull up _javascript_ functions!!

 Any guru's out there who can help?

 Thanks,
 Ryan




 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




Re: looking for a regex

2004-08-10 Thread Claude Schneegans
he wants to exclude those.

Then he should use CF_REExtract (see address below) to detect SCRIPT. /SCRIP
areas and neutrilized them before the scan.

--
___
REUSE CODE! Use custom tags;
See http://www.contentbox.com/claude/customtags/tagstore.cfm
(Please send any spam to this address: [EMAIL PROTECTED])
Thanks.
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




RE: looking for a regex

2004-08-10 Thread Pascal Peters
No it won't, there can't be a ( after the last word, it has to be a }

Pascal

 -Original Message-
 From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]
 Sent: 10 August 2004 16:53
 To: CF-Talk
 Subject: RE: looking for a regex
 
 he means this regex will return things like window.location.replace()
 or document.write() -- he wants to exclude those.
 
  \{\w+(\.\w+)*\}
 
  What do you mean by js functions?
 
  Pascal
 
  -Original Message-
  From: Ryan Mitchell [mailto:[EMAIL PROTECTED]
  Sent: 10 August 2004 16:44
  To: CF-Talk
  Subject: looking for a regex
 
  Hello
 
  I'm looking for a regex that will identify items in a
  template file
  along the lines of
 
  {item}
  {item.subitem}
  {item.subitem1.subitem2}
 
  etc...
 
  But that will not pull up _javascript_ functions!!
 
  Any guru's out there who can help?
 
  Thanks,
  Ryan
 
 
 
 
 

 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




RE: looking for a regex

2004-08-10 Thread S . Isaac Dealey
Well the regexes he was using were -- I don't know why but for some
reason I didn't interpet the {} as part of what he was looking for in
the string, and then I glossed over it in your regex...

 No it won't, there can't be a ( after the last word, it
 has to be a }

 Pascal

 -Original Message-
 From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]
 Sent: 10 August 2004 16:53
 To: CF-Talk
 Subject: RE: looking for a regex

 he means this regex will return things like
 window.location.replace()
 or document.write() -- he wants to exclude those.

  \{\w+(\.\w+)*\}

  What do you mean by js functions?

  Pascal

  -Original Message-
  From: Ryan Mitchell [mailto:[EMAIL PROTECTED]
  Sent: 10 August 2004 16:44
  To: CF-Talk
  Subject: looking for a regex
 
  Hello
 
  I'm looking for a regex that will identify items in a
  template file
  along the lines of
 
  {item}
  {item.subitem}
  {item.subitem1.subitem2}
 
  etc...
 
  But that will not pull up _javascript_ functions!!
 
  Any guru's out there who can help?
 
  Thanks,
  Ryan
 
 

 




 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




Re: looking for a regex

2004-08-10 Thread Ben Doom
I think he doesn't want to find
{document.forms[0].bob.value=dom1.dom2.function()}

I'd remove everything contained in script tags first.There are 
several threads about that in the articles.If you have onclicks or 
_javascript_ calls in anchor tags, it can get more complicated, but I 
don't want to think really hard about problems that haven't arisen yet. 
:-)

Depending on what your items look like, you might use [^. ] instead of 
\w, but Pascal (as usual) seems to have the right of it.

--Ben

Pascal Peters wrote:

 \{\w+(\.\w+)*\}
 
 What do you mean by js functions?
 
 Pascal
 
 -Original Message-
 From: Ryan Mitchell [mailto:[EMAIL PROTECTED]
 Sent: 10 August 2004 16:44
 To: CF-Talk
 Subject: looking for a regex

 Hello

 I'm looking for a regex that will identify items in a template file
 along the lines of

 {item}
 {item.subitem}
 {item.subitem1.subitem2}

 etc...

 But that will not pull up _javascript_ functions!!

 Any guru's out there who can help?

 Thanks,
 Ryan



 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




Re: looking for a regex

2004-08-10 Thread S . Isaac Dealey
he wants to exclude those.

 Then he should use CF_REExtract (see address below) to
 detect SCRIPT. /SCRIP
 areas and neutrilized them before the scan.

Which might still leave the question of a
href="">

s. isaac dealey954.927.5117
new epoch : isn't it time for a change?

add features without fixtures with
the onTap open source framework

http://www.sys-con.com/story/?storyid=44477DE=1
http://www.sys-con.com/story/?storyid=45569DE=1
http://www.fusiontap.com
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




Re: looking for a regex

2004-08-10 Thread Ben Doom
 Which might still leave the question of a
 href="">

No {}.:-)

--Ben
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




Re: looking for a regex

2004-08-10 Thread Claude Schneegans
Which might still leave the question of a
href="">

This can also be found easily with CF_REExtract

Actually, CF_REextract could be used first to extract the area where the content to analyse is to be found,
then applied a seconf time on this content (or a standard RegEx) to extract whats wanted
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




Re: Looking for URL RegEx

2004-02-17 Thread Matt Liotta
In that case, a RegEx would be the best way.

-Matt

On Feb 17, 2004, at 9:15 AM, Josen Ruiseco wrote:

 In my scenario I am searching for any url within a string of text and 
 then removing it. I am not familiar with how to begin using the method 
 you speak of. Do you know of any documentation out there for that?

Josen

I just create an instance of java.net.URL with the supplied URL 
 string.
It is able to validate that the URL is correct and has many methods 
 of
interacting with URLs, which I find to be much more useful than a
RegEx.

-Matt


On Feb 16, 2004, at 3:52 PM, Josen Ruiseco wrote:

 I am looking for a regular _expression_ that captures a domain name
 within a url. It needs to consider all the possible variations of a
 domain name, ie. domain.com, www.domain.com, www.domain.co.uk,
 domain.biz, etc.

  Does anyone have that written already?

  Thanks...

  Josen


 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Looking for URL RegEx

2004-02-16 Thread Josen Ruiseco
I am looking for a regular _expression_ that captures a domain name within a url. It needs to consider all the possible variations of a domain name, ie. domain.com, www.domain.com, www.domain.co.uk, domain.biz, etc.

Does anyone have that written already?

Thanks...

Josen
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re: Looking for URL RegEx

2004-02-16 Thread Matt Liotta
I just create an instance of java.net.URL with the supplied URL string. 
It is able to validate that the URL is correct and has many methods of 
interacting with URLs, which I find to be much more useful than a 
RegEx.

-Matt

On Feb 16, 2004, at 3:52 PM, Josen Ruiseco wrote:

 I am looking for a regular _expression_ that captures a domain name 
 within a url. It needs to consider all the possible variations of a 
 domain name, ie. domain.com, www.domain.com, www.domain.co.uk, 
 domain.biz, etc.

Does anyone have that written already?

Thanks...

Josen

 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]