Hello to all..
I am attempting (partially succesfully so far) to extract some text. The problem I am having is that it is also extracting unwanted text past the vaue I am (obviously incorrectly) specifying as the end point.
The string I am trying to extract is (in this example) ALEXANDRIA
ALEXANDRIA (attempting to extract the text between > and <)
The expression I am using is
rex field=_raw "\(?\S+)\<"
However, when I run the search, I also get the proceeding text in the returned value below:
ALEXANDRIANSW2015AUAustralia
As I say it is sort of working but I am unsure as to how to instruct the expression to stop at the <
after the suburb name.
Any help or pointers will be gratefully accepted.
---update--
The input string is
<mm:SuburbName>ALEXANDRIA</mm:SuburbName>
The suburb will vary
The output I am getting is
ALEXANDRIA</mm:SuburbName><mm:StateOrProvinceCode>NSW</mm:StateOrProvinceCode><mm:PostalCode>2015</mm:PostalCode><mm:CountryCode>AU</mm:CountryCode><mm:CountryName>Australia</mm:CountryName>
Cheers all.
Alastair
Try with this. Seems to work for the same data you have.
rex field=t "\<mm\:SuburbName\>(?<suburb>\w+)\<.*"