G
Guest
I need to parse some HTML and add links to some keywords (up to 1000) defined
in a DB table. What I need to do is search for these keywords and if they
are not already a link, and they are not inside a paragraph tag, ie <p
class=tab>, I convert it to a link. There are also 8 other conditions to
decide whether text is converted to a link.
Is there an easy way to compare match collections that are returned from
separate regular expressions? If some text is matched by all 10 or so
regular expressions then I know it should be converted. Or am I better off,
regarding performance
and maintainablilty, just building 1 huge regular expression to do all the
parsing in one go.
in a DB table. What I need to do is search for these keywords and if they
are not already a link, and they are not inside a paragraph tag, ie <p
class=tab>, I convert it to a link. There are also 8 other conditions to
decide whether text is converted to a link.
Is there an easy way to compare match collections that are returned from
separate regular expressions? If some text is matched by all 10 or so
regular expressions then I know it should be converted. Or am I better off,
regarding performance
and maintainablilty, just building 1 huge regular expression to do all the
parsing in one go.