Community Patterns

Community Library Entry

0

Regular Expression
Created·2022-03-01 08:06
Flavor·ECMAScript (JavaScript)

/
^(?![ -.&,_'":?!/])(?!.*[- &_'":]$)(?!.*[-.#@&,:?!/]{2})[a-zA-Z0-9- .#@&,_'":.?!/]+$
/
Open regex in editor

Description

This tries to validate the address in English-compliant formats.

Note: Not tested for script languages Arabic.

const regExp = /^(?![ -.&,_'":?!/])(?!.*[- &_'":]$)(?!.*[-.#@&,:?!/]{2})[a-zA-Z0-9- .#@&,_'":.?!/]+$/;
Submitted by Sowed Castelli