I'm trying to edit some xhtml
on Sigil
.
With the command
< p>([az])
I'm able to find all paragraphs that begin with lower case . That tells me that they shouldn't be separate from the previous one. It's just a conversion issue.
What should I do to delete both the < p>
from that paragraph and the < /p>
from the previous one in order to join the two blocks of text into one single paragraph ?
It looks something like this:
< p> ... that is why relationships< /p>
< p>
are not what they should be.
And it should be:
< p> that is why relationships are not what they should be.< /p>
I'm not too sure about Sigil, but the following regex should be able to do that:
First find:
</p>\s*<p>(\s*[a-z])
The replace it with:
$1
What this means:
\\s* : Any amount of whitespace
$1 : The group () youll keep after replacing
Or an easiest way by checking Dot Matches All :
<p>(.+?)</p>
And then you Replace only with: $1
or /1
( Group )
It will remain only the block of text.
(.+?)
- Everything until the first entity like slashes or > etc.
(.*?)
- Everything including entities . ( Careful! )
Build your regex
:
\\n
\\s
^
\\n
and \\s
go (\\n\\s)
*
after it. Ex: \\s*
( any white space until first entity ) ([az])
or all letters ([az]+)
([0-9])
or more numbers ([0-9]+)
only 2 first letters ([az]{2})
etc.
Advices :
()
Hope this helps you understand better your issue.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.