나는 "/index.html"("<"태그 (두 줄 전에)로 시작하는 줄)을 삭제하고이 줄을 지울 필요가있는이 줄이 있습니다. 같은 다른 모든 라인은검색어와 일치하는 여러 줄을 삭제하는 정규 표현식
예 :.
<a href="http://site.com/dir/file.html">
/dir/file.html</a>:
../../../index.html<br>
<a href="http://site.com/dir/file2.html">
/dir/file2.html</a>:
../../../page.html<br>
<a href="http://site.com/dir/name.html">
/dir/name.html</a>:
../../../index.html<br>
<a href="http://site.com/dir/any-link_.html">
/dir/any-link_.html</a>:
../../../file-name.html<br>
출력 :
<a href="http://site.com/dir/file2.html">
/dir/file2.html</a>:
../../../page.html<br>
<a href="http://site.com/dir/any-link_.html">
/dir/any-link_.html</a>:
../../../file-name.html<br>
그래서 정규 표현식은 삭제해야합니다 U가 "/index.html"이 앞에 오는 어떤 < (그 앞에 두 줄)을 붙이지 말고 다른 줄을 뒤에 둡니다.
나는 메모장 ++에서 ^./index.html과 같은 것을 시도했지만, "/index.html"이있는 행만 삭제하고, 전에는 <에서 시작하여 제거하는 방법을 모른다. 그것 2 라인.
이것은 실제로 프로그래밍 질문이 아닙니다. [** superuser.com **] (http://superuser.com/)에 대해 묻는 것은 어떻습니까? – ghoti