Back
Syntax
Study
Editor
Mode:
HTML
CSS
JavaScript
PHP
Reset
Run »
HTML / CSS / JS
import re text = "cat bat hat mat" matches = re.findall(r"[cbhm]at", text) print(matches) # ["cat", "bat", "hat", "mat"]
Result
Open