Regular Expressions 101

Sponsors

Library entries

103
javascript

trim

trim string
Submitted by fp - 9 years ago

us postal/zip

Vote

13

Regular Expression
javascript

/
(^[0-9]{4}?[0-9]$|^[0-9]{4}?[0-9]-[0-9]{4}$)
/
gm

Description

Loading markdown...
Submitted by jay johnson - 9 years ago