Thanks, but that won't cope with something like:
SUN AND SAND
"Lars Netzel" <> wrote in message
news:O7x$...
> Why not just do this?
>
> NewString = Replace(inputstring, "AND", "")
>
> /Lars
>
>
>
> "Dan" <> skrev i meddelandet
> news:%...
> > I'm trying to remove the word 'AND' (apostrophes included) from a string
> but
> > can't seem to get the correct expression.
> >
> > I've got:
> >
> > Dim regRemove As New System.Text.RegularExpressions.Regex("\b'AND'\b")
> > Dim strInput As String = "One 'AND' Two"
> > Response.Write(regRemove.Replace(strInput, ""))
> >
> > But it doesn't work. Do the apostrophes in my regex need to be escaped?
> > I've tried \' and '' but to no avail.
> >
> > Any ideas?
> >
> > Thanks
> >
> >
>
>
|