|
|
#16 | |
|
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 156
Karma: 2000
Join Date: Nov 2025
Device: none
|
Quote:
And your code does not work. The right bottom says "didn't find any matching to replace" You can read this. And this is that I fixed </i> with <\/i> so no error. Last edited by icearch; Yesterday at 11:38 AM. |
|
|
|
|
|
|
#17 | |
|
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 569
Karma: 65460
Join Date: Jun 2011
Device: Kindle Voyage, Boox Go 7
|
Quote:
The reason the search didn't match anything is because you changed the text from plain text to html! You stated your original example was plain text so I modified my regex to accommodate that instead of an HTML doc. All the lines in the new text you showed in the last post are within <p> tags. So of course the search that I modified to match your plain text example won't match anything. Plain Text: HTML: As you can see, depending on which version of the regex search i use, i get the same number of matches in both the plain text and html samples. And it doesn't require (nor should it include) a backslash before the "/i" because a forward slash isn't a special character in regex. --- P.S. What is the regex validation checker you're using? Last edited by ElMiko; Yesterday at 02:31 PM. |
|
|
|
|
| Advert | |
|
|
|
|
#18 |
|
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 156
Karma: 2000
Join Date: Nov 2025
Device: none
|
My bad, I see you tend to use html tags, so I thought you give me regex works with tags. I'm not a competent regex user so I did not spot that.
And your code works great, thank you. I use https://regex101.com/ and https://regexr.com/ to test regex. |
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| False paragraph breaks & RegEx | ColMac | Editor | 9 | 10-21-2022 03:00 PM |
| Paragraph Regex | FDPuthuff | Sigil | 2 | 09-27-2020 12:38 PM |
| How can I fix it when every line is a paragraph? | Nyssa | Editor | 30 | 12-23-2014 08:23 PM |
| regex puzzle: finding paragraph before... | cybmole | Sigil | 8 | 02-24-2012 09:06 AM |
| Chapters are one giant paragraph. How to fix? | bfollowell | Conversion | 9 | 02-03-2011 01:20 PM |