Fix for regex $options parsing

Thanks @izmailoff, was using wrong bit operator

closes #36,#37