problem in earlier versions was that you couldn't specify 'greedy' (*) or 'not greedy' (*?) matches to tell it how far to go. So the below would match on the final </script> on the page and there may be more than one
 
Also not sure if the case insensitivity flag (?i)  works either
 
try (<script[^>]*>)([^<]*)(</script>) but hope your js doesn't need the  char '<' - you can test this in homesite/studio - it appears to be similar to the cf5 syntax
 
elliot
 
 
from docs

The regular _expression_ quantifiers ?, *, +, {min,} and {min,max} specify a minimum and/or maximum number of instances of a given _expression_ to match. By default, ColdFusion locates the greatest number characters in the search string that match the regular _expression_. This behavior is called maximal matching.

For example, you use the regular _expression_ "<b>(.*)</b>" to search the string "<b>one</b> <b>two</b>". The regular _expression_ "<b>(.*)</b>", matches both of the following:

  • <b>one</b>
  • <b>one</b> <b>two</b>

By default, ColdFusion always tries to match the regular _expression_ to the largest string in the search string. The following code shows the results of this example:

 
 
"Steve Onnis" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]...
>
>
> Having a little trouble with a regular _expression_
>
> (?i)(<script[^>]*>)(.*?)(</script>)
>
> suposed to grab the script blocks, works fine under cfmx but am trying to
> implement it on a cf4.5 app.
>
>
> anyone got any ideas?
>
> Steve
>
>
>
>
---
You are currently subscribed to cfaussie as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED] Aussie Macromedia Developers: http://lists.daemon.com.au/

Reply via email to