HackerRank Incorrect Regex solution in python | python question solution
Table of Contents
You are given a string .
Your task is to find out whether is a valid regex or not.
Input Format
The first line contains integer , the number of test cases.
The next lines contains the string .
Constraints
Output Format
Print “True” or “False” for each test case without quotes.
Sample Input
2
.*+
.*+
Sample Output
True
False
Explanation
.*+ : Valid regex.
.*+: Has the error multiple repeat
. Hence, it is invalid.
Problem solution in Python 2 programming.
Problem solution in Python 3 programming.
Problem solution in pypy programming.
Problem solution in pypy3 programming.