Regular Expressions 101

Community Patterns

1...45678...902

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

/
(?:([\s\d\x2e]*[^\s\d\x2e\x3a]+[\x2e\s\d]*)|(?:[^\s\d\x2e\x3a]+[\s\d\x2e]*)[^\s\d\x2e\x3a]+)[\r\n]
/
iU

Description

This regex capture only one of string that is a combination of number, dot and characters. It can also not have any number or dot, but must have at least one character

Submitted by Moein - 8 years ago