Community Patterns

Community Library Entry

0

Regular Expression
Created·2016-12-19 10:34
Flavor·PCRE (Legacy)

/
(?:(?:(?<Name>[[:alpha:]]+)[ ]*\(['"]?(?<Value>[^)'"]*)['"]?\))|(?:(?<Null>(?:NOT NULL|NULL))))
/
gis
Open regex in editor

Description

i.e :

input:
"NUMERIC(5,2) NOT NULL DEFAULT ('100.00')" extract : Name = [ 1 => "Numeric", 2 => "Default" ] Value = [ 1 => "5,2", 2 => "100.00" ] Null = [ 1 => "NOT NULL" ]

Submitted by anonymous