I have many NSString which look like this:
@"this is the content. The content of this string may vary, as well as the length, and my include any characters, with numbers Y = 295.000000 X = 207.500000"
The part Y = 295.000000 X = 207.500000 remains always the same, apart from the X and Y numbers which may change.
I need in some way to get those numbers and do something like this:
coordsFinal.x = 295.000000;
coordsFinal.y = 207.500000;
which would have the format of:
coordsFinal.x = [NSString stringWithFormat: @"%@", trimmed string];
Any ideas??
You could use regular expressions to extract the numbers:
Output: