How would you grep for an alphanumeric strings of 1 to 50 characters (ideally, any length would work too) with a colon on each side – a typical result would be all the lines containing the string :shopping:. So far I've got the code below (I've tried some variations on it) which doesn't work:
grep ':[[:alnum:]]{1,100}:' ~/x.txt
grepby including the-Eswitch.