I think I don't really get RegEx stuff, so I need help matching the following simple pattern:
SOME_TEXT _Syn: SYN_TEXT _Ant: ANT_TEXT
quotes are decorative, X_TEXT
is any text (that does not contain _Syn
: or _Ant
: that are special abbreviation), _Syn or _Ant parts are optional
I need to get SOME_TEXT
, SYN_TEXT
and ANT_TEXT
in array
So for example if _Syn part not present (input is SOME_TEXT _Ant: ANT_TEXT
) result should be [SOME_TEXT, '', ANT_TEXT]
Tried different approaches with lazy modifiers but fails to implement it.