$ expr "$p" : '.*' Output is 11
Match all characters and print them:
$ expr "$p" : '\(.*\)' Output is "version.100"
Output the number of lowercase letters matched:
$ expr "$p" : '[a-z]*' Output is 7
Match a string of lowercase letters:
$ expr "$p" : '\([a-z]*\)' Output is "version"
Truncate $x if it contains five or more
characters; if not, just output $x. (Logical OR
uses the second argument when the first one is 0 or null, i.e., when
the match fails.)
$ expr "$x" : '\(.....\)' "$x"