I have a large log file I'm trying to extract two pieces of information from using powershell regex onto one line. The log contains all kinds of data, but the blocks I'm interested in I've given examples below. I'm trying to find the users who are logging in with the incorrect version of the app.
Sample data (It's not showing up in the preview, but there are line breaks):
Device User Name: CDALLAS
Is SSO : false
Versions : id=VNF-Android
0=Client-Version,VN v4.82.1;android;SM-G900V,.
Device User Name: smith5
Is SSO : false
Versions : id=VNF-Android
0=Client-Version,VNNEXT v4.32,.
Device User Name: joe123
Is SSO : false
Versions : id=VNF-iOS
0=Client-Version,APPSTORE v5.89;iPhone OS;iPhone8 1,.
What I need to return for each of these is:
CDALLAS 4.82.1
smith5 4.32
joe123 5.89
Ideally I'd want to exclude any records with 4.82.1 in it as that is the correct version.
For the user name part I can use something like (?<=Device User Name: )(.*)
How do I get the version number next to it though?
The version number is always preceded by "Client-Version," (some text) "v" (version#) then either a , or ;
Regex has always given me a headache. Any help would be greatly appreciated.