Y
Y
Yuriy2021-09-08 16:05:13
Regular Expressions
Yuriy, 2021-09-08 16:05:13

How to select text by setting exclusions?

Line:

Салатник  600 мл h= 4.7 см 19.3см 19.3 см d 19.3 см d=19.3 см  D=19.3 600 мл


what to choose (marked in [] brackets):

Салатник  600 мл h= 4.7 см [19.3см] [19.3 см] [d 19.3 см] [d=19.3 см]  [D=19.3] 600 мл


Here is an example https://regex101.com/r/PRg8vZ/2

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dodo512, 2021-09-08
@dodo512

(?<=см)\s*((?i:d=?\s*)?\d+(?:\.\d+)?\s*(?:см)?)
https://regex101.com/r/PRg8vZ/3

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question