We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Alternative Matching
Alternative Matching
Sort by
recency
|
160 Discussions
|
Please Login in order to post a comment
Java 15:
JavaScript:
var Regex_Pattern = /^(Mr|Mrs|Ms|Dr|Er){1}.[a-zA-Z]+$/;
pasess all test cases
Regex_Pattern = r'^(Mrs|Mr|Ms|Dr|Er)[\.][a-zA-Z]+$'
why this regex not worked for testcase 1 (Mr#DOSHI) is matched correctly how ?
**explain anyone **
import re import webbrowser
def add(x, y): return x + y
def subtract(x, y): return x - y
def multiply(x, y): return x * y
def divide(x, y): if y != 0: return x / y else: return "Error: Division by zero"
def calculator(): print("Simple Calculator") print("Select operation:") print("1. Add") print("2. Subtract") print("3. Multiply") print("4. Divide")
if name == "main": calculator()