I've been making a little stats alias for myself where i add these things into the on input event

inc %lines $1
inc %chars $len($remspace($1-))
inc %words $numtok($1-,32)

works ok, but i wanted to count ctrl codes that i use (not including spaces) but i don't know how to go about that, my guess is that it might involve $regex which i have absolutly no idea about frown

any help would be great. thanks