Hey Bill,
Well done.
You can simplify a bit by changing the Execute an AppleScript action to an Execute a Shell Script action.
As far as I can see the initial curl command is all you need, because it always produces a plain IP-address (at least in my testing).
curl -s http://icanhazip.com
If you do need to filter out just non-digit and non-. characters then it's simpler to use negation.
The caret character ^
when used at the beginning of a range [^…]
means NOT.
curl -s http://icanhazip.com | sed 's/[^0-9.]//g'
And by piping the curl result directly to sed you can avoid messing about with temp files on-disk.
NOTE — in your AppleScript the delay command is unnecessary, because execution of the script waits until the result is returned from the do shell script command before moving on to the next statement.
-Chris