You can use re.split
:
import re
s = "ads1323z123123c123123890sdfakslk123klaad,313ks"
results = list(filter(lambda x:len(x) <= 3, re.split('[^a-zA-Z]+', s)))
Output:
['ads', 'z', 'c', 'ks']
More Related Contents:
- Regex not matching all the paranthesis substrings [duplicate]
- Finding the longest substring of consecutive letters in python
- Word boundary with words starting or ending with special characters gives unexpected results
- Python re.sub with a flag does not replace all occurrences
- Extract float/double value
- Python regex – r prefix
- How to input a regex in string.replace?
- Python Regex Engine – “look-behind requires fixed-width pattern” Error
- regex for Twitter username
- Find shortest matches between two strings
- Matching Nested Structures With Regular Expressions in Python
- Python re.sub back reference not back referencing [duplicate]
- Extract a string between double quotes
- Reuse part of a Regex pattern
- Find the indexes of all regex matches?
- RegEx Get string between two strings that has line breaks
- Python – re.findall returns unwanted result
- Why Does a Repeated Capture Group Return these Strings?
- Splitting out the output of ps using Python
- How to use regex to find all overlapping matches
- How can a recursive regexp be implemented in python?
- Python regular expression pattern * is not working as expected
- Split string at every position where an upper-case word starts
- FutureWarning: The default value of regex will change from True to False in a future version
- Why does this take so long to match? Is it a bug?
- Regex matching – why does this not match and return None?
- How to use str.contains() with multiple expressions in pandas dataframes
- match dates using python regular expressions
- How to Fix JSON Key Values without double-quotes?
- How to use regex with optional characters in python?