Posts: 576
Threads: 97
Joined: Aug 2007
Hey easy question for ya probably, how would i do an if satement so if(Text = 7 numbers)
will be a random 7 numbers
like
idCon=6793020
idDan=5968382
idSam=4820505
There ID's for a program im working with for people at work.
Thanks.
Posts: 473
Threads: 33
Joined: Aug 2007
Could you explain with a little more detail?
Taking on Quick Macros one day at a time
Posts: 576
Threads: 97
Joined: Aug 2007
Hmmm, all i really need to do is figure out if a group of 7 characters are all numbers or not.
Posts: 12,140
Threads: 142
Joined: Dec 2002
Posts: 1,769
Threads: 410
Joined: Feb 2003
I really enjoy using regex when i can!
str a="1234567"
_i=findrx(a "\d{7}")
if(len(a)=7)
,if _i=-1
,,out "not 7 digits"
Posts: 576
Threads: 97
Joined: Aug 2007
I dont seem to understand this code? And it doesnt want to work....Can you please explain a little what it does and wut it should do.
Thanks and sorry for not understanding it
Posts: 1,769
Threads: 410
Joined: Feb 2003
this just checks if there are 7 numbers like you wanted.
Quote:Hmmm, all i really need to do is figure out if a group of 7 characters are all numbers or not.
Posts: 576
Threads: 97
Joined: Aug 2007
i kinda dont understand where it tells if there are or arent 7 numbers :?:
can u just add like out "yes" or out "no" if there are 7 numbers or not plz
Thanks, really sorry to bother you.
Posts: 576
Threads: 97
Joined: Aug 2007
Nevermind i think i understand it now, thanks a ton sorry for the trouble!