L
L
LakeForest2021-06-21 01:35:41
Python
LakeForest, 2021-06-21 01:35:41

How to modify a regular expression in which all + before a vowel are replaced with a void, except in exceptional situations?

Regular Expression: r'\+(?i)([aeeiouyeyyuya])'
Exception: hello +y

Texts:
x+hello++y
hello+y
l+i+string+signs+n+a d+o delete+ t
but + here + everything + ve + rno 2

+ 2 = 4

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dodo512, 2021-06-21
@LakeForest

r'\+(?i)([аеёиоуыэюя])(?<!о.у)'

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question