convert c formatter to regex