I have below query I need to extract all the column name changes but if I use
$query = ",SELECT A.Title AS Identifier ,A.HOTELNAME AS PROPERTYNAME,A.REGION AS REGION,A.T0STATUS AS STATUS,"
$query -match ",.+ AS (.+),"
I only get the last matched pattern, The result in captured group is Status but I want Identifier,PROPERTYNAME,REGION and STATUS.
So basically my question is how to use regex to find all matches instead of only one.
Code:
",SELECT A.Title AS Identifier ,A.HOTELNAME AS PROPERTYNAME,A.REGION AS REGION,A.T0STATUS AS STATUS," -match ",.+ AS (.+),"
$matches
Expectation: Identifier PROPERTYNAME REGION STATUS.
Result: STATUS
Also there is not much documentation for PowerShell Regex specifically so can you also let me know which flavor of regex PowerShell uses.