Number-Check
Sat 17 May 2025
title: "Number Check" author: "Raja CSP Raman" date: 2019-04-20 description: "-" type: technical_note draft: false
import re
pattern = re.compile("^([0-9]+)+$")
content = "s23434"
if(pattern.match(content)):
print(pattern.match(content).pos)
else:
print('not matched')
not matched
content = "23434"
if(pattern.match(content)):
print('matched at : ', pattern.match(content).pos)
else:
print('not matched')
matched at : 0
Score: 5
Category: regex