Support for regexp on different platforms

Fixes #719. Also if scope was enabled the $getter variable was overriden by scope column, which caused
```
Fatal error: Unsupported operand types
```