' 999' or ' 9999' or '9999999' ' 9'.
Is "field" length 7 or 8 chars? What is a "field" (part of a larger string)?
but when you're checking a 16 byte filed ZZZZZZZZZZZZ9V99
Um, there is no description of what you want for that one :) one thing at a time?
whilst doing the job,is getting ludicrously large and unreadable
Instead of one regex, write twelve thirteen??
Stop writing unreadable regex :) Write beautiful regex, not ugly, so you can read :) How can I hope to use regular expressions without creating illegible and unmaintainable code?
Someone at work suggested using an sprintf in it's stead within the regex, but I must be honest and say that suggestion has left me clueless on how to do it.
Are you trying to format a string? If you are, go ahead and use sprintf, otherwise ...
write a function?
Hope this helps
In reply to Re: Should be a simple spaces/digits regex....but I'm turning grey!
by Anonymous Monk
in thread Should be a simple spaces/digits regex....but I'm turning grey!
by viffer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |