Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
Python

r"
^\s*(\S.*\S)\s*$
"
gm

Description

identifies spaces at the beginning and end of lines. Can be used as a Trim function

Submitted by Eric Hills - 2 years ago