https://bugs.freedesktop.org/show_bug.cgi?id=70629

Eike Rathke <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |NOTABUG
                 CC|                            |[email protected]

--- Comment #1 from Eike Rathke <[email protected]> ---
The .+ between opening and closing tag specifies to match any character 1 or
more times and match as many times as possible. The pattern match does exactly
what you asked it to do ;-)

To find the first possible match of the closing tag the pattern needs to
specify to exclude such a closing tag in the "find any" pattern. In the
simplest case this could be [^{]+ instead of .+ if the text between the tags
can not contain a { character, if it could then the expression would get more
complicated and may involve look-ahead and what not. For available regex
operators see
http://userguide.icu-project.org/strings/regexp#TOC-Regular-Expression-Operators

If the same tags can appear nested it is even more cumbersome to match the
corresponding closing tag. However, if such tags are arbitrary it gets nearly
impossible to match all combinations, this is a similar situation to all
hopeless attempts to parse full flavored HTML using regular expressions. See
also
http://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags/1732454#1732454

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to