Discussion:
[Exist-open] Replace zero width space
Hungerburg
2017-06-23 07:36:03 UTC
Permalink
Hi All,
Can anyone help me here. How do I remove '%u200B' from a string in XQuery.
let $input := 'zero​width​spaces'
return (replace($input, "​", " "))
let $input := 'zero%u200Bwidth%u200Bspaces'
return (replace($input, "%u200B", " "))
Seems trivial?
--
Peter
Peter Stadler
2017-06-23 08:16:35 UTC
Permalink
Hi,

I don’t think the %u-notation will work, but you can enter special characters by their codepoints like &#200B;,
so replace($input, '​', ‚') should do the trick.

Best
Peter
Post by Hungerburg
Hi All,
Can anyone help me here. How do I remove '%u200B' from a string in XQuery.
let $input := 'zero​width​spaces'
return (replace($input, "​", " "))
let $input := 'zero%u200Bwidth%u200Bspaces'
return (replace($input, "%u200B", " "))
Seems trivial?
--
Peter
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
https://lists.sourceforge.net/lists/listinfo/exist-open
--
Peter Stadler
Carl-Maria-von-Weber-Gesamtausgabe
Arbeitsstelle Detmold
Hornsche Str. 39
D-32756 Detmold
Tel. +49 5231 975-676
Fax: +49 5231 975-668
stadler at weber-gesamtausgabe.de
www.weber-gesamtausgabe.de

Continue reading on narkive:
Loading...