Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

import re #your code goes here number=input() pattern=r"(1|8|9)[0-9]+" match=re.match(pattern,number) of lane(number)==8: if(match): print("value") else: print("invalid") else print("invalid")

Open Opossum answered on February 5, 2022 Popularity 1/10 Helpfulness 1/10

Contents


More Related Answers

  • python regex numbers only
  • regex pater for only 4 or 6 digits
  • regex in python to obtain only the string in python
  • regular expression for string with numbers python
  • regex for digits python
  • Python RegEx Searching for an occurrence of the pattern
  • regexp look for letter followed by 3 digits
  • regex pater for only 4 or 6 digits
  • import re handle = open('regex_sum_330187.txt') for line in handle : line = line.rstrip() numbers = re.findall('([0-9]+)',line) print(sum(numbers))

  • import re #your code goes here number=input() pattern=r"(1|8|9)[0-9]+" match=re.match(pattern,number) of lane(number)==8: if(match): print("value") else: print("invalid") else print("invalid")

    0
    Popularity 1/10 Helpfulness 1/10 Language python
    Source: Grepper
    Tags: import python
    Link to this answer
    Share Copy Link
    Contributed on Feb 05 2022
    Open Opossum
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.