I'm relatively new to RegEx and have been looking through various tutorials but struggling to understand how to put together the pattern I need.
Currently I have a string of SQL that includes repeated instances of this pattern:
,coalesce(column1,null) AS table_name.column1
table_name
could be any name given that there are multiple tables involved in the overall SQL code. What I'm trying to do is eliminate table_name
from each occurrence of this pattern. I'm thinking as long as I can identify the positions of AS
and the .
then the characters in between can be replaced with "".
Would I be incorrect in that method?