Hi
i Need to extract the below information from this tag
<zone h='50000' id='8' name='Sheet 2' show-title='true' w='84000' x='0' y='50000' />
I have tried the below regex expression
^[ ]*<zone h='(.*?)' id='(.*?)' name='(.*?)' show-title='(.*?)' w='(.*?)' x='(.*?)' y='(.*?)' />$
Whats wrong with the above regex expression, It returns null.
Expecting it to return vaues
Thanks
Karthik
Uploaded the sample workflow.
Solved! Go to Solution.
Hi Karthik,
Not sure I understand, but in the XML Parse example, it extracts the value of zone (which in your example is in fact NULL, as it's an empty tag with only attributes). Assuming you have some XML elements that do contain a zone, that value would show up there. It would then be easy to apply a filter where zone == name. (But I'm guessing you mean something more involved than that; if so could you expound?)
@johnJps
Yes there are many values with Zone but , I have an filter to get the zones only with names and I have updated the workflow. Let me know if I was not clear in explaining it.
Thanks
Karthik
Hi Karthik,
THe sample you sent the screenshot shows the standard xml " not the single quotes. So the Regex needs to be:
<zone\s*h="([^"]*)"\s*id="([^"]*)"\s*name="([^"]*)"\s*show-title="([^"]*)"\s*w="([^"]*)"\s*x="([^"]*)"\s*y="([^"]*)"\s*/>
See if that works for you.
James
Hi Pulsar
Thanks for pointing that out, It worked for the above one. However I brought in a different file and the again the out put shows null. I guess the Regex needs to be dynamic in nature to handle them
I have used the below Regex which you have given
<zone\s*h="([^"]*)"\s*id="([^"]*)"\s*name="([^"]*)"\s*show-title="([^"]*)"\s*w="([^"]*)"\s*x="([^"]*)"\s*y="([^"]*)"\s*/>
Thanks for your time and helping me out
Thanks
Karthik
Hi GarthM
I checked your soulton , It works perfectly for a single row input, However for multiple rows it concantes in to comma separated and just shows in one row. Can we show it in multiple rows, that would be great.
Thanks
Karthik