The webservice returns the following string
“ID: xxxx Status: yyyy”
How do I get the value ID value without the “ID :” text, and “Status” value without the “Status: ” text.
Id value should be xxxx
Status value should be yyyy
the value length is unknown.
One way would be with a regular expression.
This has the advantage of ‘naturally’ validating that the string returned by the web-service matches your expected format, allowing you to easily deal with bad input.
For example:
If you can clarify what
xxxxandyyyycan be (alphabets, numbers, etc.), we might be able to provide a more robust regular expression.