Z
Z
zxmanxz2020-06-16 00:08:29
Regular Expressions
zxmanxz, 2020-06-16 00:08:29

How to find matches between multiple conditions?

You need to find breaks if:
1. the line ends with a small letter + line break + the next line also starts with a small letter.
2. the line ends with a small letter + comma + line break + the next line also starts with a small letter.
This is necessary in order to later replace it with a space.

So far I've used it (?<=[a-z]\n)(.*)(?=^[a-z])for:
Or (?<=[a-z]\,\n)(.*)(?=^[a-z])

Two regular expressions work separately, but I can't mold them together...

Test text
the Olympic athletes of swimming pool,
It's not good like the women can do it,
always get flamed
It all goes back to my job
to that awful story Heaven
And the root of it equal thirty three

But it still doesn't work correctly. For example, after running a regular expression, you should get:

Test text the Olympic athletes of swimming pool,
It's not good like the women can do it, always get flamed
It all goes back to my job to that awful story Heaven
And the root of it equal thirty three.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
VicTHOR, 2020-06-16
@zxmanxz

find /([az]),?\n([az])/g
replace \1 \2
or /(?<=[a-z]),?\n(?=[a-z])/greplace with space

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question