This is a simple script that will find the first occurance of a number in a text file that contains a specified number of digits, the number can have leading "0"'s. I'm sure it can be improved upon, but some may find it useful.
This will read a text file and look for the first occurance of a number that contains a certain amount ot digits
The number can contain leading "0"'s
Input>filename,Select a file to Check
Let>INPUT_BROWSE=0
Input>d,How many digits does the number contain?
//________________Create low number with leading zeros
Let>z=d
If>z=1
Let>lownumber=1
Goto>havelow
Endif
If>z=2
let>lownumber=01
Goto>havelow
Endif
Sub>z,2
Let>lownumber=0
Let>k=0
Repeat>k
Let>k=k+1
ConCat>lownumber,0
Until>k,z
ConCat>lownumber,1
Label>havelow
//_________________________Create high number
let>h=1
Let>highnumber=9
Repeat>h
Let>h=h+1
ConCat>highnumber,9
Until>h,d
Let>k=1
Label>start
ReadLn>%filename%,k,stringread
If>stringread=##EOF##,finish
GoSub>CheckNumber
Let>k=k+1
If>%found%=Not Found
Goto>start
Endif
Label>finish
SRT>CheckNumber
Length>%stringread%,ep
Sub>ep,d
Add>ep,1
Let>s=1
Label>begingtest
MidStr>%stringread%,%s%,%d%,found
//___________________________ remove spaces, periods, backslashes from dates,colon from time
Position> ,%found%,1,spacefound
If>%spacefound%>0,Nocheck
Position>/,%found%,1,spacefound
If>%spacefound%>0,Nocheck
Position>:,%found%,1,spacefound
If>%spacefound%>0,Nocheck
Position>.,%found%,1,spacefound
If>%spacefound%>0,Nocheck
If>{(%found%>%lownumber%) and (%found%Nocheck
If>s=ep,Notfound
let>s=s+1
Goto>begingtest
Label>Notfound
Let>found=Not Found
Label>havefoundnumber
END>CheckNumber
MDL>%found%