Greatest Common Divisor Your task is to compute the greatest common divisor (GCD) of two given integers in as few bytes of code as possible.

You may write a program or function, taking input and returning output via any of our accepted standard methods (including STDIN/STDOUT, function parameters/return values, command-line arguments, etc.).

Input will be two non-negative integers. You should be able to handle either the full range supported by your language's default integer type, or the range [0,255], whichever is greater. You are guaranteed that at least one of the inputs will be non-zero.

You are not allowed to use built-ins that compute either the GCD or the LCM (least common multiple).

Standard code-golf rules apply.

Test Cases

0 2     =&gt; 2
6 0     =&gt; 6
30 42   =&gt; 6
15 14   =&gt; 1
7 7     =&gt; 7
69 25   =&gt; 1
21 12   =&gt; 3
169 123 =&gt; 1
20 142  =&gt; 2
101 202 =&gt; 101
Retina, 16
^(.+)\1* \1+$
$1

This doesn't use Euclid's algorithm at all - instead it finds the GCD using regex matching groups.
Try it online. - This example calculates GCD(8,12).
Input as 2 space-separated integers.  Note that the I/O is in unary.  If that is not acceptable, then we can do this:
Retina, 30
\d+
$*
^(.+)\1* \1+$
$1
1+
$.&amp;

Try it online.
As @MartinBüttner points out, this falls apart for large numbers (as is generally the case for anything unary).  At very a minimum, an input of INT_MAX will require allocation of a 2GB string.