support for custom RegExp and callback
update test with callback