In fact the Build Process doc also uses *sed*:

```
sed -i '' s/${OLD_DEV_VERSION}/${BUILD_VERSION}/g addon/package.json
```

But you need `sed -E` to use extended regular expressions with plus signs, and MozillaBuild's version of *sed* is too old for that.

So I think you're going to have to fall back to something like this line of Perl, which works on all three platforms:

```
grep version addon/package.json | perl -p -e 's/.*([0-9]+\.[0-9]+(pre|a|b)?[0-9]+).*/\1/'
```