> Hi,
> sorry for late reply...though....
> Try this approach
> #free spacing regex
> </[a-z][0-9]?> #closing html tag, used just as a milestone
> (.(?<!\<))+ #any char but not the one that has "<" to
> #the left of it, repeated many times, thus
> #making a loooong word
> <[a-z][0-9]?> # opening html tag, used just as a milestone
> this one catches this snippet from your example
> </h2>yeeeeeeeeeeeeyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
> which destroys <i>
> Note: i deleted line breaks from your text before applying my regex
> --
> Regards, Eugeny
> On Wed, May 27, 2009 at 5:32 PM, Ciaran <cronok...@hotmail.com> wrote:
> > Hi I'm trying to write a regexp that adds a <wbr> word break tag to
> > all words in a html string that are longer than 10 characters. The
> > problem is the regexp match needs to ignore all strings inside < and >
> > as they are obviously part of the code itself.
> > Here's what I have so far but it doesn't seem to match correctly:
> > (?<!<)(\S{10,200})(?!>)
> > By the way, I'm using this site a lot lately which is very cool for
> > regex beginners:
> >http://gskinner.com/RegExr/
> > Thanks a lot,
> > Ciarán
> --
> best regards, Eugeny
Great, Thanks for the reply. At first glance it looks good but it