How to match match the string from the list using python regular expression?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP


How to match match the string from the list using python regular expression?



Hi I have a list of strings ['gool', 'gol', 'log']



I need to create a regex such a way that only gol and log has to print. If i using re.search all the strings are getting printed and re.match will check the starting of the letter so only gol and gool are getting printed.



We can give by giving condition of len = 3









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Arduino Mega cannot recieve any sketches, stk500_recv() programmer is not responding

Visual Studio Code: How to configure includePath for better IntelliSense results

C++ virtual function: Base class function is called instead of derived