[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Split camel-case strings into words?
Using Martinbs better Unicode points with the lookbehind/lookahead approach: tokenize('MicrosoftExchangeOnline', '(?<=\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: 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<>)
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|