import re
pattern = re.compile("^([A-Z][0-9]+)+$")
pattern.match(string)
More Related Contents:
- Regex for existence of some words whose order doesn’t matter
- python – regex search and findall
- How to use a variable inside a regular expression?
- Match a whole word in a string using dynamic regex
- How to check for valid email address? [duplicate]
- Case insensitive regular expression without re.compile?
- Python string.replace regular expression [duplicate]
- Split a string at uppercase letters
- Regex matching 5-digit substrings not enclosed with digits
- How to split but ignore separators in quoted strings, in python?
- Regular expression to extract URL from an HTML link
- BeautifulSoup – search by text inside a tag
- How to extract an IP address from an HTML string?
- Get the string within brackets in Python
- Split string based on a regular expression
- Split string on commas but ignore commas within double-quotes?
- Python – Using regex to find multiple matches and print them out [duplicate]
- Regular expression parsing a binary file?
- Remove duplicate chars using regex?
- Match any unicode letter?
- Python replace string pattern with output of function
- How can I make multiple replacements in a string using a dictionary?
- Python regex split without empty string
- Creating a custom categorized corpus in NLTK and Python
- Warning raised by inserting 4-byte unicode to mysql
- How do I verify that a string only contains letters, numbers, underscores and dashes? [duplicate]
- Python regex findall
- Python regex: matching a parenthesis within parenthesis
- Regexp finding longest common prefix of two strings
- Download all pdf files from a website using Python