I have a regular expression as
[^><]
for not matching the start and close tags
But how can I use this regular expression to do the above checking with allowing only the bold tags like <b>
and </b>
Thanks
I have a regular expression as
[^><]
for not matching the start and close tags
But how can I use this regular expression to do the above checking with allowing only the bold tags like <b>
and </b>
Thanks
As pswg states, don't use regular expressions to parse (x|ht)ml.
That said, if you use a regular expression anyway, you will find stripping out not bold tags much easier using:
<\/?[^b]*?>
And simply replacing that with nothing like so: http://regex101.com/r/uY7eK3