2011 Feb 08 9:38 AM
Hello,
I'm totally lost with regular expresions... But I'm sure that it's possible to get the "Out" value if I have this XML into an string with regular expresion...
How can I do this?
I need to get the value 8456 into a variable.
<?xml version="1.0" encoding="UTF-8"?>
<Values version="2.0">
<value name="Out">8456</value>
<value name="In">8899</value>
</Values>
2011 Feb 08 1:25 PM
Will this help ?
DATA: var TYPE string.
var = '<value name="Out">8456</value>'.
REPLACE ALL OCCURRENCES OF REGEX '<[a-zA-Z\/][^>]*>' IN var with space.
WRITE: var.
skip 1.
var = '<value name="In">8899</value>'.
REPLACE ALL OCCURRENCES OF REGEX '<[a-zA-Z\/][^>]*>' IN var with space.
WRITE: var.
skip 1.
Hello,
I'm totally lost with regular expresions... But I'm sure that it's possible to get the "Out" value if I have this XML into an string with regular expresion...
How can I do this?
I need to get the value 8456 into a variable.
<?xml version="1.0" encoding="UTF-8"?>
<Values version="2.0">
<value name="Out">8456</value>
<value name="In">8899</value>
</Values>
2011 Feb 08 1:25 PM
Will this help ?
DATA: var TYPE string.
var = '<value name="Out">8456</value>'.
REPLACE ALL OCCURRENCES OF REGEX '<[a-zA-Z\/][^>]*>' IN var with space.
WRITE: var.
skip 1.
var = '<value name="In">8899</value>'.
REPLACE ALL OCCURRENCES OF REGEX '<[a-zA-Z\/][^>]*>' IN var with space.
WRITE: var.
skip 1.
2011 Feb 08 7:31 PM
I'm kind of lazy. I would just run it through FM SOTR_TAGS_REMOVE_FROM_STRING
Concatenating everything together as input gives 8456 8899 as output