Created
July 7, 2020 10:12
-
-
Save sardinecan/55612aeb52f678e972f4ab275f295380 to your computer and use it in GitHub Desktop.
tokenize/regex mixed xml content
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xquery version "3.1"; | |
let $map := map { | |
"method": "xml", | |
"version": "1.0", | |
"indent": true(), | |
"use-character-maps": map { | |
"<":"<", | |
">":">" | |
} | |
} | |
let $data := "1/ <name>toto</name>, toto 2/ <name>titi</name>, titi 3/ <name>tutu</name>, titi" | |
let $regex := "\d/ .*?" | |
return fn:serialize(fn:analyze-string($data, $regex), $map) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment