Pascal

question regarding this regex:

 <[ ]*title[ ]*>([^<]*)</[ ]*title[ ]*>

1. Do I need the subexpression brackets if so why?
2. SO is it because I did not account for an opening < that my regex didnt
work?

Thanks


Kola Oyedeji
Web developer
Macromedia Certified Advanced ColdFusion 5 Developer
ekeda ltd
http://www.ekeda.co.uk
(+44)020-8429-7300


> -----Original Message-----
> From: Pascal Peters [mailto:[EMAIL PROTECTED]]
> Sent: 01 February 2002 16:39
> To: CF-Talk
> Subject: RE: another quick regular expression question
>
>
> This is incorrect. the regexp below will match "hello world". Try
> running the code below
> <cfoutput>#ReFindNoCase("[ ]*hel[ ]*lo[ ]*wo[ ]*rld"," Hello
> World")#</cfoutput>
>
> For the original question:
>

>
> this will match your title if there is no < in the title.
>
> The expression "<[ ]*title[ ]*>(.*)</[ ]*title[ ]*>" will match the
> title if you have only ONE <title> tag. If you have more, it
> will match
> everything from the first <title> to the last </title>
>
> Pascal Peters
> Certified ColdFusion (5.0) Advanced Developer
> Certified Web Developer
> Macromedia Certified Instructor
> LR Technologies, Belgium
> Tel   +32 2 639 68 70
> Fax   +32 2 639 68 99
> Email [EMAIL PROTECTED]
> Web   www.lrt.be
>
>
>
> -----Original Message-----
> From: Steve Oliver [mailto:[EMAIL PROTECTED]]
> Sent: vrijdag 1 februari 2002 17:17
> To: CF-Talk
> Subject: RE: another quick regular expression question
>
>
> I don't think it works that way with spaces.
>
> If I have the string "hello world"
>
> And do a regexp for
>
> [ ]*he[ ]*llo[ ]*wor[ ]*ld[ ]*
>
> I don't believe that will work either,
>
> But this way should
>
> hello[ ]*world
>
> Or
>
> hello[[:space:]]*world
>
>
> ______________________
> steve oliver
> atnet solutions, inc.
> http://www.atnetsolutions.com
>
>
> 
______________________________________________________________________
Why Share?
  Dedicated Win 2000 Server � PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation � $99/Month � Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to