xsl-list
[Top] [All Lists]

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

2020-11-17 14:29:39
On Tue, 2020-11-17 at 13:08 +0000, Martin Honnen 
martin(_dot_)honnen(_at_)gmx(_dot_)de
wrote:

On 17.11.2020 13:43, Don Smith dsmith_lockesmith(_at_)yahoo(_dot_)com 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/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--

<Prev in Thread] Current Thread [Next in Thread>