Ungreedy
panigrc - October 22, 2009 - 07:45
| Project: | Search and Replace Scanner |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Description
You can make this module ungreedy (with /U option see http://www.php.net/manual/en/reference.pcre.pattern.modifiers.php) by changing the variable $flags to U
if ($mode) { // Case Sensitive
$where = "CAST(t.%s AS BINARY) "; // BINARY to force case sensative.
$flag = 'U'; // ungreedy
}
else { // Case Insensitive
$where = "t.%s ";
$flag = 'U'; // ungreedy used to be i //ci flag for use in php preg_search and preg_replace
}