Yes, UltraEdit regular expressions like
string1[^t^p -ÿ]+string2 or
string1[~^b]+string2 are greedy and there is no way to make them not greedy as the Perl regular expression engine offers.
I think, you are the first user who tries to get a grouped function list for a multi-language highlighted file. And I think, IDM has not designed the grouped function strings for multi-language highlighted files. It makes absolutely sense for me from a programmers point of view that whenver the syntax highlighting language is changed, a new function string parsing session starts. You must think of a multi-language HTML file like a set of individual files just packed together into a single file like in an archive file. Each block has its own syntax highlighting file with its own definitions. Why should anybody think that functions in a Javascript block should be listed in the function list view as a subgroup of a tags block for something like following?
Code: Select all
[%MYTAG block %]
[%INNERTAG1 %]
<script type="text/javascript">
// Javascript code
</script>
[%INNERTAG2 %]
[%/MYTAG %]
The Javascript block is a completely different language interpreted by a completely different software module than the lines outside. So for the UltraEdit function string parser this block is read as
File 1 - HTML:
Code: Select all
[%MYTAG block %]
[%INNERTAG1 %]
<script type="text/javascript">
File 2 - Javascript:
File 3 - HTML:
Code: Select all
</script>
[%INNERTAG2 %]
[%/MYTAG %]
I hope this makes clear why the Javascript code breaks function string parsing also into 3 parts for this example. It would be possible to read a multi-language HTML file different. I could image to interpret a HTML file with multiple languages also different by splitting the file into multiple files with one file per language each containing all text from the source file being part of a language. With such an algorithm the example above would result internally in 2 files to parse.
Code: Select all
[%MYTAG block %]
[%INNERTAG1 %]
<script type="text/javascript">
</script>
[%INNERTAG2 %]
[%/MYTAG %]
File 2 - Javascript:
But it looks like this is not the way UltraEdit parses a HTML file. I don't know if browsers do that, but I don't think so because of small inline codes of other languages which need the context like
<p style="color:red"> (HTML, CSS, HTML).
My problem on helping you here is that you want general regular expression answers on questions for very content based problems. I'm not able to give them without the content. I need the content to help you purposeful. Best would be you pack a good example file, the wordfiles needed to syntax highlight this example file and a text file showing me what you want to see in function list view in which structure together into a ZIP or RAR file and upload this archive file as attachment to your next post. Then I could help you much better or at least can tell you that what you want is not possible.
Please note that the function list feature is in general not designed for files like HTML, XHTML, XML and similar where tags can exist within same or other tags. As
pietzcker wrote
in this post (and some others):
Regular expressions are not able to deal with arbitrarily nested structures. That's why for XML Manager a special XML parser is used and why for HTML Close Tag feature of UEStudio the IntelliTips feature is necessary which are coded specially to handle nesting of tags. Regular expression finds/replaces are not designed for taking into account a content structure. They are designed for character streams without any structure because finds/replaces do not split a file content into hierarchical blocks or objects.