Regular Expression to get tables from SQL query
June 3rd, 2020 in .Net, BlogIf you’ve not come across regular expressions (RegEx) before then you’re missing out, they’re an incredibly powerful tool for matching, extracting or validating patterns of text. I had a use case this week where I needed to take a SQL query, and quickly identify every table or view that was used in the query. RegEx to the rescue! (?<=((FROM[ \n\r]+)|(JOIN[ \n\r]+)|(APPLY[…
» Read more