user33435: I'm looking to determine if an Arduino String contains any other character than those that would be in the [number],[number]'\r''\n'where [number] could be positive or negative.
I know I can run a for down the entire string and use if(isDigit([char]) || isWhitespace([char])||[char]=='-') however, I imagine there's a better way to do this.
Could I (for example) convert the String to an array of values and search the array for any value that doesn't correspond to the characters I'm looking for? Or is there a better way to check this out?

user31105: There is a better way, which is called regular expressions (or regexp). However, afaik these are not supported by Arduino by default.
However, I'm sure you can find some 'generic C++' class that can handle them.
For that, it's best to check on StackOverflow.com probably.
After a short check, on the Arduino forum there is a library available for regexp:
library
It is created by Nick Gammon, so all credits are for him.

33435: <p>I'm looking to determine if an Arduino <strong>S</strong>tring contains any other character than those that would be in the <code>[number],[number]'\r''\n'</code>where <code>[number]</code> could be positive or negative.</p>

<p>I know I can run a for down the entire string and use <code>if(isDigit([char]) || isWhitespace([char])||[char]=='-')</code> however, I imagine there's a better way to do this.</p>

<p>Could I (for example) convert the String to an array of values and search the array for any value that doesn't correspond to the characters I'm looking for? Or is there a better way to check this out?</p>
 31105: <p>There is a better way, which is called regular expressions (or regexp). However, afaik these are not supported by Arduino by default.</p>

<p>However, I'm sure you can find some 'generic C++' class that can handle them.</p>

<p>For that, it's best to check on StackOverflow.com probably.</p>

<p>After a short check, on the Arduino forum there is a library available for regexp:</p>

<p><a href="http://forum.arduino.cc/index.php?topic=59917.0" rel="nofollow noreferrer">library</a></p>

<p>It is created by Nick Gammon, so all credits are for him.</p>
