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

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -