- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to use wildcard in Python regular expression?
The following code uses the Python regex .()dot character for wildcard which stands for any character other than newline.
Example
import re rex = re.compile('th.s') l = "this, thus, just, then" print rex.findall(l)
Output
This gives the output
['this', 'thus']
- Related Articles
- How to use range in Python regular expression?
- How to use variables in Python regular expression?
- How to use special characters in Python Regular Expression?
- How to write a Python regular expression to use re.findall()?
- How do we use re.finditer() method in Python regular expression?
- How do we use Python Regular Expression named groups?
- How do we use a delimiter to split string in Python regular expression?
- How do we use Python regular expression to match a date string?
- How to use regular expression in Java to pattern match?
- How to use Python Regular expression to extract URL from an HTML link?
- How to use regular expression in class path in TestNG.xml?
- How do we use wildcard or regular expressions with a jQuery selector?
- How to match parentheses in Python regular expression?
- Why do we use re.compile() method in Python regular expression?
- How to use % wildcard correctly in MySQL?

Advertisements