Positive Lookahead – HackerRank Solution

In this post, we will solve Positive Lookahead HackerRank Solution. This problem (Positive Lookahead) is a part of HackerRank Regex series.

Solution – Positive Lookahead – HackerRank Solution

Python

Regex_Pattern = r'o(?=oo)'
import re

Test_String = input()

match = re.findall(Regex_Pattern, Test_String)

print("Number of matches :", len(match))

Note: This problem (Positive Lookahead) 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 *