Dear Experts ,
Need your help with regular expression. I have an XML tag in the field f.
I would like to extract all the characters including spaces (or) Special characters from this XML string <Rmk>
.
I tried to use search | rex field=f "\<Rmk\>"(?<Rmk>\w*)"\<\/Rmk\>"
, however this regular expression is not giving any output.
your help is much appreciated with this query.
XML Tag :
<Rmk>ABC*/ Work Direct---</Rmk>
Desired Output : ABC*/ Work Direct---
Hi kirangurram,
try this regex
\<Rmk\>(?<Rmk>[^\<]*)\<\/Rmk\>
Bye.
Giuseppe
Just add ... | spath input=f
, like this:
|makeresults | eval f="<Rmk>ABC*/ Work Direct---</Rmk>"
| spath input=f
Hi kirangurram,
try this regex
\<Rmk\>(?<Rmk>[^\<]*)\<\/Rmk\>
Bye.
Giuseppe
Hi kirangurram,
if you're satisfied of this solution, please accept and/or upvote it.
See next time.
Bye.
Giuseppe
didn't see you commented there Giuseppe 🙂 deleting my answer 🙂
thanks for your help @gcusello . Your solution works.