Re: [xsl] Split camel-case strings into words?

Subject: Re: [xsl] Split camel-case strings into words?
From: "Chris Papademetrious christopher.papademetrious@xxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 10 May 2023 19:22:30 -0000
Using Martinbs better Unicode points with the lookbehind/lookahead approach:

tokenize('MicrosoftExchangeOnline', '(?&lt;=\p{Ll})(?=\p{Lu})', ';j')


From: Martin Honnen martin.honnen@xxxxxx
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Wednesday, May 10, 2023 3:17 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: [xsl] Split camel-case strings into words?



On 5/10/2023 9:12 PM, Eliot Kimber
eliot.kimber@xxxxxxxxxxxxxx<mailto:eliot.kimber@xxxxxxxxxxxxxx> wrote:

In an XQuery context, what is the easiest way to split a camel-case string
into words?

So given bMicrosoftExchangeOnlineb return (bMicrosoftb,
bExchangeb, bOnlineb).



I was going to ask ChatGPT but the servers are apparently overloaded with
people asking trivial questions.



Asking the XSL list instead of ChatGPT about XQuery?

Well, I think

analyze-string('MicrosoftExchangeOnline', '\p{Lu}\p{Ll}*')/*:match/string()

might do it.
XSL-List info and
archive<https://urldefense.com/v3/__http:/www.mulberrytech.com/xsl/xsl-list__
;!!A4F2R9G_pg!fjTun9sDi_gJoDjzwMOxP1pfXqbO3WiNjFLjhwudM6yRIpQnJSlTwT2896gbAMd
CAfOsWtxlWgAqJ0yLg-CKSYxX-M7yPDItGlqPuyZT4f_eh5bQuxYf$>
EasyUnsubscribe<https://urldefense.com/v3/__http:/lists.mulberrytech.com/unsu
b/xsl-list/3380743__;!!A4F2R9G_pg!fjTun9sDi_gJoDjzwMOxP1pfXqbO3WiNjFLjhwudM6y
RIpQnJSlTwT2896gbAMdCAfOsWtxlWgAqJ0yLg-CKSYxX-M7yPDItGlqPuyZT4f_eh8v0gt8E$>
(by email<>)

Current Thread