#!/bin/bashin=FOO_123_BAR.bazquuxperl -pe 's|^FOO_([0-9]+)_BAR\.(.+)$|"FOO=" . ($1 + 1) . " BAR=" . $2|e' <<< "$in"
Standard input is empty
FOO=124 BAR=bazquux
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!