Patch from Shaun Jackman:
authorRob Landley <rob@landley.net>
Mon, 9 May 2005 21:42:42 +0000 (21:42 -0000)
committerRob Landley <rob@landley.net>
Mon, 9 May 2005 21:42:42 +0000 (21:42 -0000)
commit540d3f60f378ed26962501c33b335623fe5fb0fa
treed1d847dde8db22ab7af9a24fb018250bb51060fb
parentb9dfb8c03febea78ab1924b4924c381ca983891c
Patch from Shaun Jackman:

> This patch modfies expr to use portable POSIX regex rather than BSD
> regex.
...
> This updated patch implements an anchored regex by checking that the
> match starts at offset 0.

More to the point, this patch uses the same regex that sed.c is already using
(opportunity to suck in less library code), and even building a dynamically
linked busybox with just expr the result is a slightly smaller binary (by 94
bytes, I dunno what nm --size-sort has to say about it because I didn't build
with debug info, since that changes the binary size a lot by disabling
optimization...)

Your mileage may vary.  Handle with caution.  Do not taunt happy fun ball.
coreutils/expr.c