findall only works with a string as input not a list.

You probably want to use map and re.match or re.search for example:

Also your regex has multiple repeat symbols in it and needs some tuning, this one seems to work J\w{3}son

import re
a = ["Jackson", "Johnson", "Jason"]
c = list(map(lambda x: re.search("J\w{3}son",x), a))
print([i.string for i in c if i])

output:

['Jackson', 'Johnson']

Update if your input type is just a string then your original expression was fine you just need to change the regex to the example above

import re
a = "Jackson Johnson Jason"
b = re.findall("J\w{3}son", a)
print(b)

output:

['Jackson', 'Johnson']
Answer from Alexander on Stack Overflow
🌐
Python documentation
docs.python.org › 3 › library › re.html
re — Regular expression operations
The result depends on the number of capturing groups in the pattern. If there are no groups, return a list of strings matching the whole pattern. If there is exactly one group, return a list of strings matching that group. If multiple groups are present, return a list of tuples of strings matching the groups. Non-capturing groups do not affect the form of the result. >>> re.findall(r'\bf[a-z]*', 'which foot or hand fell fastest') ['foot', 'fell', 'fastest'] >>> re.findall(r'(\w+)=(\d+)', 'set width=20 and height=10') [('width', '20'), ('height', '10')]
🌐
GeeksforGeeks
geeksforgeeks.org › python › python-regex-re-search-vs-re-findall
Python Regex: re.search() VS re.findall() - GeeksforGeeks
July 12, 2025 - re.findall(r'\$(\d+)', s) searches the entire string for all numbers that come after a dollar sign $. pattern \$(\d+) uses a capturing group (\d+) to extract one or more digits following each $ symbol.
Discussions

how to re.findall
re.findall(r'\D+,', code) Your regular expression here, \D+, means "find me a non-numeric digit, followed by at least one character of any type, followed by a comma" 'a, b' meets that - note, this is NOT ['a', 'b']. Nothing else meets it It's not that trivial to get ['a', 'b', 'c'] with a regex - if you don't HAVE to use a regex here, don't, there are much simpler ways If you MUST use a regex, something like this works >>> re.findall(r'(\D)(?:,|$)', code) ['a', 'b', 'c'] The regex here says "Find me a non-digit charater, followed by either ',' or the end of the string" The (?:...) thing means "don't include this group in the output You don't strictly need to use \D in this case, I assumed you had it in there for a reason. Depending on what you expect to be between the commas, other things will work also. More on reddit.com
🌐 r/learnpython
5
4
September 14, 2024
How to use Python regex pattern matching with re.findall(pattern, string)? - Stack Overflow
I need to match to the strings "Johnson" and "Jackson", but not the string "Jason." Using Python, I need to use the function findall in the RegEx library. More on stackoverflow.com
🌐 stackoverflow.com
regex - How can I find all matches to a regular expression in Python? - Stack Overflow
When I use the re.search() function to find matches in a block of text, the program exits once it finds the first match in the block of text. How do I do this repeatedly where the program doesn't s... More on stackoverflow.com
🌐 stackoverflow.com
Regex findall start() and end() ? Python - Stack Overflow
If you actually need a list, just use matches = list(re.finditer(…)). ... Use finditer instead of findall. This gives you back an iterator yielding MatchObject instances and you can get start/end from the MatchObject. ... Find the answer to your question by asking. Ask question ... See similar questions with these tags. ... 2 Python ... More on stackoverflow.com
🌐 stackoverflow.com
🌐
W3Schools
w3schools.com › python › python_regex.asp
Python RegEx
A special sequence is a \ followed ... pair of square brackets [] with a special meaning: The findall() function returns a list containing all matches....
🌐
Reddit
reddit.com › r/learnpython › how to re.findall
r/learnpython on Reddit: how to re.findall
September 14, 2024 -

how to use re.findall so that it outputs from code = 'a, b, c' is ['a', 'b', 'c'] because a = re.findall([r'\D+,'], code) outputs ['a, b,']

🌐
AppSignal
blog.appsignal.com › home › python › python regex: how to use re.search, re.match, and re.findall
Python Regex: How to Use re.search, re.match, and re.findall | AppSignal Blog
January 15, 2025 - re.findall() finds all matches of a pattern in a string and returns them as a list of strings. Use it when you need to find all pattern occurrences in a string. In this section, we'll dive into some more advanced regex techniques for Python.
🌐
Codecademy
codecademy.com › docs › python › regular expressions › re.findall()
Python | Regular Expressions | re.findall() | Codecademy
July 2, 2023 - The .findall() method iterates over a string to find a subset of characters that match a specified pattern. It will return a list of every pattern match that occurs in a given string.
Find elsewhere
🌐
GeeksforGeeks
geeksforgeeks.org › python › re-findall-in-python
re.findall() in Python - GeeksforGeeks
July 23, 2025 - re.findall() method in Python helps us find all pattern occurrences in a string. It's like searching through a sentence to find every word that matches a specific rule.
🌐
University of Pittsburgh
sites.pitt.edu › ~naraehan › python3 › re.html
Python 3 Notes: Regular Expressions
Python 3 Notes [ HOME | LING 1330/2330 ] Regular Expressions << Previous Note Next Note >> On this page: re module, re.findall(), re.sub(), re.compile(), re.search(), re.search().group(). The re Module So you learned all about regular expressions and are ready to use them in Python.
🌐
Medium
medium.com › @ynagalakshmi89 › getting-started-with-regex-in-python-basics-and-re-findall-explained-95d3ed6ab026
“Getting Started with Regex in Python: Basics and re.findall Explained” | by Nagalakshmi Yadlapalli | Medium
December 30, 2025 - re.findall() method in Python helps us find all pattern occurrences in a string. It’s like searching through a sentence to find every word that matches a specific rule.
🌐
Stack Overflow
stackoverflow.com › questions › 4697882 › how-can-i-find-all-matches-to-a-regular-expression-in-python
regex - How can I find all matches to a regular expression in Python? - Stack Overflow
When I use the re.search() function to find matches in a block of text, the program exits once it finds the first match in the block of text. How do I do this repeatedly where the program doesn't s...
🌐
Google
developers.google.com › google for education › python › python regular expressions
Python Regular Expressions | Python Education | Google for Developers
The re.findall(pat, str) function finds all matches of a pattern in a string and returns them as a list of strings or tuples, depending on whether the pattern contains capturing groups.
🌐
LinkedIn
linkedin.com › pulse › refindall-orsan-awawdi-frbrf
re.findall
Login to LinkedIn to keep in touch with people you know, share ideas, and build your career.
🌐
Python documentation
docs.python.org › 3 › howto › regex.html
Regular expression HOWTO — Python 3.14.7 documentation
findall() has to create the entire list before it can be returned as the result. The finditer() method returns a sequence of match object instances as an iterator:
🌐
Substack
veedaily19.substack.com › veeraj’s substack › actually way to learn python to build projects + clear interviews.
Actually Way to Learn Python to build projects + Clear Interviews.
April 23, 2026 - This helps you actually solidify your learnings, build while you learn and prepare for interviews. And so, today , I am sharing h… · Subscribe to Veeraj’s Substack to keep reading this post and get 7 days of free access to the full post archives.
🌐
Medium
medium.com › data-science › regular-expressions-using-the-re-module-to-extract-information-from-strings-3d0500e8db1c
Regular Expressions : Using the “re” Module to Extract Information From Strings | by Muriel Kosaka | TDS Archive | Medium
December 29, 2020 - The sea otter team had already trained Rosa so they could examine her eyes, and built on that trust to include administering the eye drops she needs.' Now, you want to extract all occurrences of Rey from the text, for which you would do something like this: rey_occurences = "Rey" re.findall(rey_occurences, aquarium)# Output ['Rey', 'Rey', 'Rey', 'Rey']
🌐
Euron
euron.one › community › posts › 1c103529-f792-444c-a476-447ca3c64fcb
Python Regex: findall(), search(), split() - Quick Guide - Euron Daily | Euron Community
February 23, 2026 - import re text = "The cat sat on the mat." pattern = r"at" result = re.findall(pattern, text) print(result) # Output: ['at', 'at', 'at'] search() finds the first match of a pattern in a string.
🌐
Xah Lee
xahlee.info › python › python_re.findall.html
Python: Regex re.findall
If one or more groups are present in the pattern, return a list of groups; this will be a list of tuples if the pattern has more than one group. import re print(re.findall(r'( +)(@+)', 'what @@@do @@you @think')) # [(' ', '@@@'), (' ', '@@'), (' ', '@')]