Re: Analyze-string Regex to Match Content within Curly Braces

"Liam R. E. Quin [email protected]" <[email protected]>
Newsgroups gmane.text.xml.xsl.general.mulberrytech
Message-ID <[email protected]>
On Tue, 2020-11-17 at 13:08 +0000, Martin Honnen [email protected]
wrote:
> 
> On 17.11.2020 13:43, Don Smith [email protected] wrote:
> > <text>In the be{opthyphen}gin{opthyphen}ning</text>
> 
> 
> The curly braces need to be escaped as \{ and \}

Or you can use [{] and [}], which i find easier because \{....\} are 
special instead of { } in some regular expression languages. This works
for ( ) too, since \(...\) is a capturing group in sed, vi, etc., so
[(] and [)] work pretty much everywhere.

You still have to write [{{] and [}}] unless you use a variable; i'd
recommend using a variable, though, so you can give it a name that's in
the problem domain, such as "superscript-regex".

As to Mike Kay's typographical point, one can to some extent use the
maths fonts, but it's tedious and often ugly, depending on the browser:
https://www.fromoldbooks.org/Heraldry-Kent/transcription/chap1sec2.html
I'd like to see presentation mathml integrated through CSS into Web
browsers, so that one could simply declare an element to have a left
brace, or fence as mathematicians call it.

-- 
Liam Quin, https://www.delightfulcomputing.com/
Available for XML/Document/Information Architecture/XSLT/
XSL/XQuery/Web/Text Processing/A11Y training, work & consulting.
Barefoot Web-slave, antique illustrations:  http://www.fromoldbooks.org
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/3329386
or by email: [email protected]
--~--
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.