Hello! Dear community, as always, I ask for your help. Help create a universal template.
There is a list of lines:
- ap JSC "TGC-2"
- JSC "TGC-2"
- TGK-2 an
- TGK-2 ao
- TGK-2 an
- TGK-2 ao
- Sberbank of Russia JSC ao
- Sberbank of Russia JSC
- "KrasnyOktyabr" JSC - JSC
- OJSC "KrasnyOktyabr" - JSC
Variations of the name itself can be many, I specifically need something like this plan:
(ао|ап)(здесь название)(ао|ап)
such a template is needed to further saw off ao or an, depending on where this phrase will be located, the task is to get only the name itself without ao or an and without the “-” symbol
I came up with such a template, but it doesn’t really want to work:
^(ао|ап)*(\s.*\s.*\s.*\s.*\s)(ао|ап)$*