Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread Valid character search
Mon, Oct 24 2016 10:48 AMPermanent Link

Matthew Jones

What's the fastest way to check for valid characters? EWB doesn't support "in", so I can't do "if char in ['0'..'9','.']" in a loop. I could do a Pos, but for some reason that seems slower. Is it? Any other options?

--

Matthew Jones
Mon, Oct 24 2016 2:30 PMPermanent Link

Trinione

"Matthew Jones" wrote:
What's the fastest way to check for valid characters? EWB doesn't support "in", so I can't do "if char in ['0'..'9','.']" in a loop. I could do a Pos, but for some reason that seems slower. Is it? Any other options?
--

Matthew:
I use and suggest Regular Expressions - RegEx.

Here's a recent thread on this.  http://bit.ly/2f9zh3Y
Tue, Oct 25 2016 5:20 AMPermanent Link

Matthew Jones

Trinione wrote:

> "Matthew Jones" wrote:
> What's the fastest way to check for valid characters? EWB doesn't support "in", so I can't do "if char in ['0'..'9','.']" in a loop. I could do a Pos, but for some reason that seems slower. Is it? Any other options?

That's a good idea. Thanks. In this particular instance I think I will keep Pos, but knowing RegEx is available will help for more complex or where speed is needed.

--

Matthew Jones
Image