0

This is slightly different to most questions regarding HTML tags in strings - I want to add HTML!

I'm using a WYSIWYG editor which produces some eratic results. What im looking to do is to check the string it produces and check whether there are any sentences that aren't wrapped in a <p></p> tag. Typical strings could be:

Example 1

<p>Hello, this is string 1</p>

But string two doesnt appear to be in a <p> tag.

Example 2

None of this text is in <p> tags.

Oh dear!

Example 3

Single line of text, again not in a <p> tag.

Could this be done using a regular expression?

Thanks Al

Lou Franco
  • 87,846
  • 14
  • 132
  • 192
higgsy
  • 1,991
  • 8
  • 30
  • 47

1 Answers1

1

Sure :), but it could be a bit complicated.

http://support.microsoft.com/kb/308252

And for testing it : http://visualstudiogallery.msdn.microsoft.com/fr-FR/16b9d664-d88c-460e-84a5-700ab40ba452

ykatchou
  • 3,667
  • 1
  • 22
  • 27