In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces how to use regular expressions to match all table names, the article is very detailed, has a certain reference value, interested friends must read it!
Regular expression, also known as regular representation, conventional representation (English: Regular Expression, often abbreviated to regex, regexp or RE in code), is a concept in computer science. Regular expressions use a single string to describe and match a series of strings that conform to a syntactic rule. In many text editors, regular expressions are often used to retrieve and replace text that matches a certain pattern.
Write out all the table names in the matching SQL statement, memo record
After a long period of torture, the regular expression is as follows:
\ *\ s+from\ s + [\ w\ [\]] *.? [\ w\ [\]] *\.?\ [? (\ b\ w+)\]? [\ r\ n\ s] *
Support for various expressions
SELECT * FROM Config SELECT * FROM [dbo]. IMEIUser SELECT * FROM dbo.LotteryLog SELECT * FROM [GreenPrize] SELECT * FROM [dbo]. [Config] SELECT * FROM dbo. [prize] SELECT * FROM [DBName]. [dbo]. [Config]
Screenshot:
Use Match (input) .result ("$1") to get
Of course, from in regular expressions can also be written as greedy mode, which can support the acquisition of tables such as insert join update.
The above is all the content of the article "how to use regular expressions to match all table names". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.