Sorry, but I think what you want is not possible with UltraEdit v18.104.22.1681 because of following reasons:
- You can define function groups with the names Section, Dates, RUNSPEC, GRID, etc. But the group name is not a search string expression for finding the start of a block. It would be possible to define a group with name Sections which finds the blocks EDIT, END, GRID, OPTIMIZE, PROPS, REGIONS, RUNSPEC, SCHEDULE, SOLUTION, SUMMARY. However, even with the blocks listed in group Sections and therefore having the first requirement fulfilled, there are further problems for your list.
- UltraEdit is supporting currently Perl regular expressions on top level. The open and close tags and the regular expression strings in second and lower levels must be UltraEdit regular expressions. I don't know if any user has this issue already reported to IDM or not. I think the first time documented was it in forum topic Subgroups in function list using Perl regular expressions. I don't have a problem with this for my own syntax highlighting languages and therefore did not report this issue. When no other user reported it, IDM perhaps even don't know that the Perl engine is not used for the regular expression strings in subgroups and the open/close tag strings.
- With only the UltraEdit regular expression engine there is the problem that a case sensitive search is not possible. Only the Perl engine has modifiers for changing the case sensitivity in the search string itself.
- With only the UltraEdit regular expression engine it is not possible to add more than 2 strings into an OR expression, but we would need definitely an OR expression with more than 2 strings.
You can and should report by email to IDM that /Regexp Type = Perl
is not also used for the open/close tag expressions and for the regular expressions for subgroups.
And you can suggest a feature request for an option like First level function strings define blocks
which when enabled should result in splitting a file into blocks according to following rules:
- The line below the line(s) a string is found with an expression of a top level function string group is the first line of this function block.
- The line above the (first) line a string is found with an expression of a top level function string group is the last line of the previous function block if there is one.
- The end of the file is the end of the last function block if any top level function string is found.
- All lines from top of the file to first found top level function string do not belong to a block.
It would be good to have this option for every top level group because in your case the group Sections
would make use of this option, but the group Dates
would not make use of it. Of course with multiple top level function groups the user would need to be careful with the function definitions and with usage of that option to avoid overlapping blocks for subgroup function string searches.