automatic keyword generation regular expression

Asked 1 years ago, Updated 1 years ago, 121 views

Look for regular expressions on the web page that link specific characters.

I referred to the following page.
http://am-yu.net/2012/03/19/auto_keyword_link_php/

However, in this regular expression, if the tag attribute string contains a keyword, it will get stuck in the regular expression and the generated HTML will be corrupted.

Please tell me a regular expression that won't collapse or another way to deal with it.

Thank you for your cooperation

php regular-expression

2022-09-30 21:27

1 Answers

Replace the string instead of the entire original HTML document
Let's scan the DOM with js and convert only the contents.


2022-09-30 21:27

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.