C
Chris Beach
Hi there,
I'm attempting to extract a number from a string, and I'm using the
following code:
Regex prRegexp = new Regex( @"Rank_1:\d+\d+)" );
MatchCollection matches = prRegexp.Matches( responseText.ToString() );
responseText.ToString() evaluates to "\n\nRank_1:1:4\n\n"
I'm only getting one match back, in the matches collection. The value
of this is the whole string.
I'd expect to get a second match which contains the final digit (4),
but this doesn't appear
Any ideas, folks? I'd appreciate some help on this
Regards
Chris Beach
I'm attempting to extract a number from a string, and I'm using the
following code:
Regex prRegexp = new Regex( @"Rank_1:\d+\d+)" );
MatchCollection matches = prRegexp.Matches( responseText.ToString() );
responseText.ToString() evaluates to "\n\nRank_1:1:4\n\n"
I'm only getting one match back, in the matches collection. The value
of this is the whole string.
I'd expect to get a second match which contains the final digit (4),
but this doesn't appear
Any ideas, folks? I'd appreciate some help on this
Regards
Chris Beach