Adding regex flags

PREG_OFFSET_CAPTURE is a very important flag
Merge pull request #1154 from PhrozenByte/enhancement/RegexFlags

Adding regex flags