Regular Expressions 101

Community Patterns

get_data

-1

Regular Expression
PCRE (PHP <7.3)

/
[^\s|,|(|)]+
/
g

Description

Extract any kind of numerical value (int or double, positive or negative) from a string written as a vector (ie '(#1, #2, #3)' ).

Submitted by Jamie C. Dyer - 2 years ago