Camillia
asked on
What is this code doing?
I stepped thru this code but still not sure what it'ssupposed to do:
if address1 = "XYZ street"
Address2 ="ABC street"
This code does some regex and i think it should get XYZ?? What is that match.Success looking for?
Regex _rxFirstToken = new Regex(@"^\s*(?<First>\S+)" , RegexOptions.Compiled);
if address1 = "XYZ street"
Address2 ="ABC street"
This code does some regex and i think it should get XYZ?? What is that match.Success looking for?
Regex _rxFirstToken = new Regex(@"^\s*(?<First>\S+)"
string token = string.Empty;
Match match = _rxFirstToken.Match(address.Address1 + " " + address.Address2);
if (match.Success)
{
token = match.Groups["First"].Value;
}
return token;
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.