Заполнить маску RegExp в JavaJAVA

Программисты JAVA общаются здесь
Гость
Заполнить маску RegExp в Java

Сообщение Гость »


I have 100 RegEx masks like:

Код: Выделить всё

Service - (?Start|End) (?\w*) - (?[0-9-]{10})(?: - (?.*))?
to search for something, when a RegEx finds something I extract the data to compose another (closing) sentence to search for

Код: Выделить всё

Service - End Foo - 2024-03-09
When searching for the closure I cannot use RegEx because it could find me another opening with different data.
So I need in java to compose a sentence by replacing the data I retrieved inside the RegEx mask. There is a way in java?
Thank You


Источник: https://stackoverflow.com/questions/781 ... sk-in-java

Вернуться в «JAVA»