2条回答
  • 2020-12-30 19:53

    You could search for:

    <li><a href="#">[^\n]+
    

    And replace with:

    $0</a>
    

    Where $0 is the whole match. The exact semantics will depend on the language are you using though.


    WARNING: You should avoid parsing HTML with regex. Here's why.

    0 讨论(0)
  • 2020-12-30 19:54

    By default . (any character) does not match newline characters.

    This means you can simply match zero or more of any character then append the end tag.

    Find: <li><a href="#">.* Replace: $0</a>

    0 讨论(0)
提交回复
热议问题