From e43535ee5b1105e616e76569937ea08c29034f9f Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Tue, 22 Dec 2009 18:57:20 +0000 Subject: [PATCH] Make regular expression stable against commas in data types, such as DECIMAL(10,7). Keeping compatibility to spaces in data types, like INT UNSIGNED. Fixes issue #1554. --- source/routine_editor.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/routine_editor.pas b/source/routine_editor.pas index af3df6da..2537099a 100644 --- a/source/routine_editor.pas +++ b/source/routine_editor.pas @@ -168,7 +168,7 @@ begin if Create[i] = '(' then Inc(ParenthesesCount); end; - rx.Expression := '(^|,)\s*((IN|OUT|INOUT)\s+)?(\S+)\s+([^,]+)'; + rx.Expression := '(^|,)\s*((IN|OUT|INOUT)\s+)?(\S+)\s+([^\s,\(]+(\([^\)]*\))?[^,]*)'; if rx.Exec(Params) then while true do begin Context := UpperCase(rx.Match[3]); if Context = '' then