I need to parse the first 10 chars of a file name to see if they are all digits. The obvious way to do this is fileName =~ m/^\\d{10}/ but I\'m not seeing anything regExy i
Here's another way to check if first ten characters of any string are digits.
on checkFilename(thisName)
set {n, isOk} to {length of fileName, true}
try
repeat with i from 1 to 10
set isOk to (isOk and ((character i of thisName) is in "0123456789"))
end repeat
return isOk
on error
return false
end try
end checkFilename