fork(1) download
  1. import re
  2. s = '+91 1234567890, 1234567790, 012345678900, 1234568901112, 01234567890'
  3. print(re.findall(r'(?<!\w)(?:(?:\+91|0)\s?)?\d{10}\b', s))
Success #stdin #stdout 0.02s 27712KB
stdin
Standard input is empty
stdout
['+91 1234567890', '1234567790', '01234567890']