ahref 문자열 사이의 "example"을 제거합니다.

ahref 문자열 사이의 "example"을 제거합니다.

이것 좀 도와주실 수 있나요?

Ctrl + Alt를 누른 다음 선택하는 것이 있다는 것을 알고 있지만 다음과 같은 코드를 사용하고 싶습니다(예:(<a) "[0-9a-f-]")*

<a "Testt 22" href="https://test.com" data-href="https://test.com/">

to 

<a href="https://test.com" data-href="https://test.com/">

왜냐면 난 그냥 간단하게 만들었거든정보

답변1

  • Ctrl+H
  • 무엇을 찾다:<a \K.*?(?=href=)
  • 다음으로 교체:LEAVE EMPTY
  • 확인하다 줄 바꿈
  • 확인하다 정규식
  • 선택 취소 . matches newline
  • Replace all

설명:

<a              # <a and a space
\K              # forget it
.*?             # 0 or more any character, not greedy
(?=href=)       # positive lookahead, make sure we have href= after

스크린샷(이전):

여기에 이미지 설명을 입력하세요

스크린샷(이후):

여기에 이미지 설명을 입력하세요

관련 정보