regex - Match line break with regular expression -
<li><a href="#">animal , plant health inspection service permits provides information on various permits animal , plant health inspection service issues online access acquiring permits. i want use regular expression insert </a> @ end of permits. happens of similiar blocks of html/text have line break in them. believe need find line break \n line contains(or starts with) <li><a href="#">.
you search for:
<li><a href="#">[^\n]+ and replace with:
$0</a> where $0 whole match. exact semantics depend on language using though.
warning: should avoid parsing html regex. here's why.
Comments
Post a Comment