Hello! There is a set of strings of this kind:

38.3 x 26 x 2.9 cm

34,54 x 24,15 x 2,39 cm

29,8 x x 20,61 of 2.08 cm

41,95 x 27,9 x 2,78 cm

I was using something like Internet has made finding numbers (this is the smallest size - thickness)

But I can't do to I have missed the line where this number is greater than 2,5 (2.5), i.e. in this example, these lines superfluous:

38.3 x 26 x 2.9 cm

41,95 x 27,9 x 2,78 cm

38.3 x 26 x 2.9 cm

34,54 x 24,15 x 2,39 cm

29,8 x x 20,61 of 2.08 cm

41,95 x 27,9 x 2,78 cm

I was using something like Internet has made finding numbers (this is the smallest size - thickness)

`(?<![\w\d]) 2(?![\w\d])|(?<![\w\d])x 2(?![\w\d])|(?<![\w\d]) 2(?![\w\d])(?=.*\bсм\b)|(?<![\w\d])x 2(?![\w\d])(?=.*\bсм\b)|(?<![\w\d])x2(?![\w\d])|(?<![\w\d])x2(?![\w\d])(?=.*\bсм\b)`

But I can't do to I have missed the line where this number is greater than 2,5 (2.5), i.e. in this example, these lines superfluous:

38.3 x 26 x 2.9 cm

41,95 x 27,9 x 2,78 cm

asked March 19th 20 at 08:52

1 answer

answered on

Solution

Find more questions by tags Regular expressions