Regular Expressions 101

Community Patterns

Stack Overflow (match only words)

0

Regular Expression
Python

r"
(\w+)(?!\()\W+
"
gm

Description

  1. a word is anything valid within a parens (like in a function), but the function itself should not be matched
  2. a word may have a numeric at the end or the start
  3. there is no guarantee of a single space (or ANY space other than some operators)
Submitted by Cambuchi - 3 years ago