Match a string that ends with a ;
make it optional and do not capture that group as it is not required. But do capture the rest of the string that occurs after the first condition.
Text1: transfer from source not possible; snapmirror may be misconfigured, the source volume may be busy or unavailable.
Text2: snapmirror may be modified, the destination volume is unavailable.
Desired OUTPUT:
snapmirror may be misconfigured, the source volume may be busy or unavailable
snapmirror may be modified, the destination volume is unavailable
I want my regex to look for the 'transfer from source not possible' or any string that occurs in that way before a semi-colon and I want my regex not to capture this as a group.
Also, I want to capture everything that occurs after a semi-colon till the end.
Regex tried: (?:.*;)? (.+)\..*
The above regex works for Text1 but not for Text2. Anyone help me fix this please?