How do I replace only the first <br> tag across multiple files?
-
@guy038 Terrific! You are great! I was sensible enough to figure out that by, “
sensible to case” you mean, “case sensitive” and by, “The $0 syntax represents the overall match, so the string <br>, with this exact case” you mean, “The $0 syntax represents the overall match, which is the string <br>, with this exact case”. You must be French.Merci beaucoupfor your help! I learnt French some 30 years ago butje ne peux pas parler beaucoup de françaissimply because I seldom bumped into French speaking people later. -
@Terry-R No problem!
-
@PeterJones
@Scott-Nielson said in How do I replace only the first <br> tag across multiple files?:@Alan-Kilborn or anyone else. I am doing Edit->Line Operations->Reverse line order, then in the RegEx mode,
Find:^[^/]+\K<br>to find the last (which is actually the first since the lines are reversed)<br>tag in each section and Replace:<br>zxcvb,
Then Find:(?s)(?<=color:black'>)-(.*?) *(?=zxcvb)and Replace:qwerty$1xxxwhere qwerty and xxx are some HTML codes I wanna add but is there a RegEx that can help me do the needful without the Edit->Line Operations->Reverse line order (to find the first<br>tag in each section)?By the above, you should have figured out that I do try to figure out how to do these things.
I seek a solution here only if I am unable to figure out what to do and will continue to do so - I ain't too proud to beg.I thank you for the RegEx that helped me find the very first<br>tag -(?s)\A.*?\K<br>
Thanks again! -
@PeterJones If you give me a link to check out something or give me a hint, I do check it out but luckily, @guy038 gave me the right solution (spoon feeding as you call it)!
-
Hi, @scott-nielson and All,
A bit off-topic : Yeah, it’s a common mistake when doing translations ! In French, this kind of words are known as “faux amis” words ! Just because :
-
In English, the adjective
sensiblehave the French sense ofraisonnable/senséorpratique -
In French the adjective
sensiblehave the English sense ofsensitiveornoticable
So, I should have used the expression
sensitive to case!Cheers,
guy038
-
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