I am trying to use XSLT to transform a XML in to flat text. One of the node has the following content and I need to extract the string that appears before the text “fail”
I was planning to use the analyze-string function and having trouble creating the regular expression for it. I tried to see if I could use the lookahead pattern but unable to do so.
Can someone tell what would be the regular expression for extracting the text within square brackets before the text “fail”:
Text
[[2500, 4500]] fail(expected [[2100, 3000, 4000, 5000, 5400, 6000, 8000, 10000]])
Final output
[2500, 4500]
/\[(\[.+?\])\] fail/and get$1.