Using Regex I want to separate the column names (if any) from their aliases. As I mentioned below, I created an expression but it does not work without quotes.
Thank you !
(?<nameFull> #nameRegex
(?<name>[^"'`]+) #name
(?<nameQoute>["'`]+)? #name Qoute
)
(?<aliasFull> #aliasRegex
\s+ #before Alias WhiteSpace
(?<AS>AS\s+)? #AS Is match or Not match
(?<aliasQoute>["'`])? #alias Qoute
(?<alias>[^"'`]+) #alias
)?
You can also see the test I made with this link.