Log mytext contains pattern "[^A-Za-z0-9]" -- true if text contains any non-alphanumeric chraracters
Log mytext contains pattern "[^\w]" -- true if text contains any non-alphanumeric or underscore chraracters
Hey @scsvel,
In case you would like to use Sensetalk patterns which are regular expressions in a more “wordy” way you can.
set mytext to "Karsten11"
put mytext contains <chars in ("0".."9")>
put mytext contains <digits>
put mytext contains <nonAlphanumeric>
log every occurrence of <2 digits> in mytext --["11"]
log every occurrence of <3 letters> in mytext --["Kar","ste"]