I guess for syntax highlighting files with extension SQL UEStudio uses
mysql.uew in directory
%appdata%\IDMComp\UEStudio\wordfiles. This wordfile contains only 1 UltraEdit regular expression string to find functions:
/Function String = "%[ ^t]++create table[ ^t]+`++^([a-z_0-9]+^)`++"- % ... start search at beginning of a line.
- [ ^t]++ ... 0 or more occurrences of spaces or tabs CAN follow.
- create table ... then this not case sensitive string MUST follow.
- [ ^t]+ ... the next character MUST be a space or tab character and both characters CAN exist also multiple times.
- `++ ... the next character CAN be a left single quotation mark. I don't know anything about SQL, but most languages use straight single quotes. Are in SQL really left single quotation marks used?
- ^(...^) ... show the string part matching the expression inside the round brackets in the function list.
- [a-z_0-9]+ ... a string MUST follow with at least 1 character which consists of only 0-9, A-Z, a-z and an underscore.
- `++ ... the next character CAN be again a left single quotation mark. This is of course a completely useless expression here at end of the expression.
Your functions are not found because the lines do not start with
create table.
You could use an OR expression to find tables and views:
/Function String = "%[ ^t]++create[ ^t]+^{table^}^{view^}[ ^t]+`++^([a-z_0-9]+^)"or make it more general and find all type of CREATE followed by 1 string consisting only of letters with following expression:
/Function String = "%[ ^t]++create[ ^t]+[a-z]+[ ^t]+`++^([a-z_0-9]+^)"But both regular expressions do not find your PLPGSQL function example. For this type of functions I suggest an additional function string inserted below the first function string.
/Function String 1 = "%*function[ ^t]+^([a-z_0-9]+^)[ ^t]++("To your second question with the PHP functions listed twice in the function list. Wordfile
php.uew contains 4 regular expressions:
/Function String = "%[^t ]++function[^t ]+^([a-z0-9_&]+^)"
/Function String 1 = "%[^t ]++function[^t ]+^([~{]+^)"
/Function String 2 = "%[^t ]++^{public^}^{private^}[^t ]++function[^t ]+^([a-z0-9_&]+^)"
/Function String 3 = "%[^t ]++protected[^t ]++function[^t ]+^([a-z0-9_&]+^)"The first one finds functions and tags only the function name on the same line for the function list. The second one is more general and works only with UES 9.00 (or even later, not tested) and UE v15.00 (or even later, also not tested) and later versions because it tags everything to next opening brace. The expression
[~{]+ can match strings also over multiple lines. Previous versions of UE and UES did not support displaying a found multi-line string in the function list. It looks like IDM has added here something because this works now and it looks like UE and UES replace now every line ending and preceding spaces in the found string by a single space to create a single line string for the function list.
So if you want in the function list just the function name, delete the line starting with
/Function String 1 = and renumber the following 2 lines. If you want the functions with arguments in the function list, delete the first function string line, remove
SPACE ONE from the next line and renumber the other 2 function strings.
And finally I strongly recommend to copy the (modified) wordfiles you really use into a not write-protected directory like
%appdata%\IDMComp\UEStudio\MyWordfiles and specify this directory in the syntax highlighting configuration dialog. Why? You don't have to think about wordfile updates with or without backup and possible manual restore when after an update/upgrade UEStudio asks you if one of the currently 13 standard wordfiles in the standard wordfiles directory should be updated. With your wordfiles in a separate directory you can always choose "yes, update with no backup" because the wordfiles in your separate directory are never updated. However, it is advisable to backup your wordfiles on a different storage medium in case of a hard disk or file system failure.