Adding Double quotes inside Reg-EX xpath evaluation
Hi Team,
I am trying to concat a json string with my json databank result
It supossed to be result as {"hashvalue":"hascontentFromXPath"}.
As i am not able to pass "(double quote) inside the reg-ex, i just passed single quote get the below result.
concat("{'hashvalue':" ,"'","hascontentFromXPath","'","}") ===> {'hashvalue':'hascontentFromXPath'}
is there any way to insert double quotes in it. ??
Note:
Below thready says i have to use backslash before double quote, its not working parasoft.
https://stackoverflow.com/questions/16761596/how-to-represent-the-double-quotes-character-in-regex
Comments
-
In XPath, use two double quotes to escape a single double quote:
concat("{""hashvalue"":""", /some/xpath/text(), """}")0 -
IT may be easier to wrap each section in a single quote, like so:
concat ( ' {"hashvalue": ' , ' " ', /root/pennywise[1]/text() , ' " ', ' } ')
0 -
Thanks OMAR, its working.
I did tried ' " ', but inside two double quotes
0