Capturing & Non-Capturing Groups – HackerRank Solution

In this post, we will solve Capturing & Non-Capturing Groups HackerRank Solution. This problem (Capturing & Non-Capturing Groups) is a part of HackerRank Regex series.

Solution – Capturing & Non-Capturing Groups – HackerRank Solution

Python

Regex_Pattern = r'(ok){3,}' # Do not delete 'r'.


import re

print(str(bool(re.search(Regex_Pattern, input()))).lower())

Note: This problem (Capturing & Non-Capturing Groups) is generated by HackerRank but the solution is provided by CodingBroz. This tutorial is only for Educational and Learning purpose.

Leave a Comment

Your email address will not be published. Required fields are marked *