Something like this, if I understand the question correctly...
m/^(authentication\s(shared|open)\s?(.+)?)/
...would be a reasonable choice for the regexp.
$2 will contain shared or open. $3 will be defined and will contain whatever comes after shared or open, if something exists. That should get you going in the right direction.
Dave
In reply to Re: Extracting test from a string using regex
by davido
in thread Extracting text from a string using regex
by ramya2005
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |