Thanks for the replies havent tested them out yet but will they work if the
title tag actualy has spaces inside as well?
< title > </title >

Also could anyone see where I went wrong in my original regular expression:
<[ ]*title[ ]*>[ ]*[[:alpha:]]*[[:punct:]]*[ ]*</title>

 as I'm trying get to grips with reg expressions.I assumed that * means 0 or
more occurences so the above should match <title>untitled</title> even if
there are no spaces or punctuation.

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: Steve Oliver [mailto:[EMAIL PROTECTED]]
> Sent: 01 February 2002 01:11
> To: CF-Talk
> Subject: RE: another quick regular expression question
>
>
> Brent, Try this :)
>
> <cfset string="<title>blah blah blah</title>">
>
> <cfset test=rereplace(string,"<title>(.*?)</title>","\1")>
>
> <cfoutput>#test#</cfoutput>
>
> ______________________
> steve oliver
> atnet solutions, inc.
> http://www.atnetsolutions.com
>
>
> -----Original Message-----
> From: Brent Goldman [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 31, 2002 8:09 PM
> To: CF-Talk
> Subject: RE: another quick regular expression question
>
>
> Hi Steve,
>
> Won't the .* pick up the </title> part?
>
> -Brent
>
> > -----Original Message-----
> > From: Steve Oliver [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, January 31, 2002 4:31 PM
> > To: CF-Talk
> > Subject: RE: another quick regular expression question
> >
> >
> > An easier way to do that would be something like
> >
> > "<title>(.*?)</title>"
> >
> > That will get everything between the two titles no matter
> what it may
> > be.
> >
> > ______________________
> > steve oliver
> > atnet solutions, inc.
> > http://www.atnetsolutions.com
> >
> >
> > -----Original Message-----
> > From: Brent Goldman [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, January 31, 2002 7:28 PM
> > To: CF-Talk
> > Subject: RE: another quick regular expression question
> >
> >
> > Hi,
> >
> > Use this regex:
> >
> > <cfset regex =
> > "<title>[[:space:]]*[[:alnum:][:punct:]]*[[:space:]]*</title>">
> > <cfset find = REFindNoCase(regex, string)>
> >
> > Don't forget the NoCase, or else it won't match <TITLE>asdf</TITLE>
> >
> > -Brent
> >
> > > -----Original Message-----
> > > From: Kola Oyedeji [mailto:[EMAIL PROTECTED]]
> > > Sent: Thursday, January 31, 2002 4:15 PM
> > > To: CF-Talk
> > > Subject: another quick regular expression question
> > >
> > >
> > > Hi
> > >
> > > Can anyone explain why this regex does not match every
> > > title?(i'm using it
> > > in cfstuido on a directory of html and cfml files)
> > >
> > > <[ ]*title[ ]*>[ ]*[[:alpha:]]*[[:punct:]]*[ ]*</title>
> > >
> > > It will not match <title>untitled</title> for example what am
> > > I doing wrong?
> > >
> > > Thanks in advance
> > >
> > > Kola
> > >
> >
> >
>
> 
______________________________________________________________________
Dedicated Windows 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=coldfusiona
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