

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- 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 match a single character in python using Regular Expression?
We use the following code to match and print any single character in the given string using python regular expression.this matches any single character in the given string
Example
import re foo = 'https://www/twitter/index.php 403' result = re.findall(r'.', foo) print result
Output
This gives the output
['h', 't', 't', 'p', 's', ':', '/', '/', 'w', 'w', 'w', '/', 't', 'w', 'i', 't', 't', 'e', 'r', '/', 'i', 'n', 'd', 'e', 'x', '.', 'p', 'h', 'p', ' ', '4', '0', '3']
- Related Questions & Answers
- How to match a nonwhitespace character in python using Regular Expression?
- How to match any one uppercase character in python using Regular Expression?
- How to match any non-digit character in Python using Regular Expression?
- How to match a word in python using Regular Expression?
- How to match a whitespace in python using Regular Expression?
- How to match nonword characters in Python using Regular Expression?
- How to match only digits in Python using Regular Expression?
- How to match parentheses in Python regular expression?
- How to match only non-digits in Python using Regular Expression?
- How to match digits using Java Regular Expression (RegEx)
- How to match any one lowercase vowel in python using Regular Expression?
- PHP – Match regular expression using mb_ereg_match()
- How to match a regular expression against a string?
- Explain Python regular expression search vs match
- How to match non-digits using Java Regular Expression (RegEx)
Advertisements