I am trying to extract substrings that come before either a left parenthesis or a dot with regexp(). For example
example1='qwer(1).asdf; qwer(1).zxcv;';
example2='qwer.asdf; qwer.zxcv;';
I tried
expression='(?<varname>.*?)(\(\d+\)){?}.';
expression='(?<varname>.*?)(?<others>\(\d+\)){?}.';
expression='(?<varname>.*?)\(';
expression='(?<varname>.*?)(';
expression='(?<varname>.*?)/(';
with
parts=regexp(example1,expression,'names');
None worked.
How exactly does matching with parenthesis work in regexp()?
The official documentation doesnt mention how to characters that form operators, quantifiers, etc.