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

スクリーンショット(前):

ここに画像の説明を入力してください

スクリーンショット(後):

ここに画像の説明を入力してください

関連情報