Back
Syntax
Study
Editor
Mode:
HTML
CSS
JavaScript
PHP
Reset
Run ยป
HTML / CSS / JS
import re # \d = digit, \w = word char, \s = whitespace print(re.findall(r"\d+", "abc 123 def 456")) # ["123", "456"] print(re.findall(r"\w+", "hello world!")) # ["hello", "world"] print(re.findall(r"\S+", "a b c")) # ["a", "b", "c"]
Result
Open