Regex: Find all between strings. Select everything that is extra after `html` on the same line
-
hi, I have this strange situation. I have a lots of line that contain links that ends with
htmlBut in some cases, I have some lines that contain more than a simple link.the-book-is-here.html yes-I-love-you.html contact.html continuation-of-the-last-harmony.html"><img src="frrr/flag_lsd_en.jpg" title="en" alt="en" width="28" height="19" /></a> create-a-beautiful-team.html create-a-new-vision-of-the-art-down.html the-cat-i-like-here.html important-dates-here.htmlThe output should be
"><img src="frrr/flag_lsd_en.jpg" title="en" alt="en" width="28" height="19" /></a> So I must select everything that is extra after
htmlon the same line.I try this regex, but are not good:
FIND:
(html)(.*?)(html)$
REPLACE BY:\2 -
Hello, @robin-cruise and All,
Try this regex S/R :
SEARCH
(?-s)\.html.+</a> \K.+html$REPLACE
Leave EMPTY
Or, may be, this more simple one :
SEARCH
(?-s)\.html.+\K\x20.+html$REPLACE
Leave EMPTYBR
guy038
-
This post is deleted! -
thank you @guy038 but I wanted to select something else. The regex should select exactly this line, that is framed by
htmltag"><img src="frrr/flag_lsd_en.jpg" title="en" alt="en" width="28" height="19" /></a> -
SEARCH:
(")(.*?;)(.*?)\s+
REPLACE BY:\1\rOR
SEARCH:
(")(.*?;)(.*?)\s+
REPLACE BY:\1\r\t\t\t\t\t
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login