I'm new posting to this site, but use it extensively.
I'm using the following regex pattern:
(\w{2})_(\w{3}) (\w{2,4}) ([\w ]+) - ([\w ]+)
Works perfectly on any of the following Strings when trying to match:
Rg_Svr GB This is a Test - Permission
Rg_Svc TW ThisIsATest - Permission Also
It also works on the following, but I don't want it to:
Rg_Svc TW ThisIsATest - Permission Also - AndMoreText
Rg_Svc TW ThisIsATest - Permission Also - And More Text
Basically, I don't want Powershell to have a successful match if there is anything after the 5th Capturing Group.
Results from match are:
1. [0-2] `Rg`
2. [3-6] `Svc`
3. [7-9] `TW`
4. [10-21] `ThisIsATest`
5. [24-40] `Permission Also `
Thanks in advance!