Regex not within <script> tags -
this question has answer here:
need regex. i'd match within given string of html matches pattern \*[a-z0-9\_]+\*
not fall in between <script>
start , end tags. know has lookarounds, haven't clue how there.
using regex lookaround. can use:
(?!<script>)\*[a-z0-9\_]+\*(?!</script>)
that match regex if not preceded , postceded script
Comments
Post a Comment