Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
foo=ABCDEFGH13XXX99
if [[ $foo =~ ([[:digit:]][[:digit:]]) ]]
then
echo ${BASH_REMATCH[0]}
fi

Keybase proof

I hereby claim:

  • I am antiphase on github.
  • I am antiphase (https://keybase.io/antiphase) on keybase.
  • I have a public key ASBB5RsbiGNbEaUSyjCpWel0awO-wlfx7OIFs3mv_13nJAo

To claim this, I am signing this object: