I
I
Ivan2021-11-12 17:39:19
Regular Expressions
Ivan, 2021-11-12 17:39:19

What is the correct way to write this regular expression?

Good evening everyone. I know that I need to teach them myself, but I urgently need to realize one moment, but I don’t know how.
There is a line without hyphens, for example:

Привет андрей, какой-же ты красивый, давай посмотрим что у тебя есть с собой:а) Что-то;б)не-что-то

I need to move the answer options to the next line. I just made it so after ';' it was transferred and it works with all, except the first. How to make one regular expression that works for everyone?

What I think: I need to make it look for expressions with a letter from a to d (for example) and a bracket after it, i.e. for example: a), b), d). And after that I will do a regular expression.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dodo512, 2021-11-12
@dodo512

Find: (:|;)([а-г]\))
Replace: $1\n$2
https://regex101.com/r/We6wBy/1

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question