summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a57530d)
raw | patch | inline | side by side (parent: a57530d)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 24 Jan 2011 13:27:24 +0000 (13:27 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 24 Jan 2011 13:27:24 +0000 (13:27 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20608 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/functions.inc | patch | blob | history |
index 22670325a322509c57f3c9a8fed9e99d8d96f171..1e13afa0f5aa69aff239b79828deca83c415b0e4 100644 (file)
// Get all matching parts of the given string and sort them by
// length, to avoid replacing strings like '%uidNumber' with 'uid'
// instead of 'uidNumber'; The longest tring at first.
- preg_match_all('/(\{?%([a-z0-9]+)(\[(([0-9]+)(\-([0-9]+))?)\])?\}?)/i', $str ,$matches, PREG_SET_ORDER);
+ preg_match_all('/(\{?%([a-z0-9_]+)(\[(([0-9_]+)(\-([0-9_]+))?)\])?\}?)/i', $str ,$matches, PREG_SET_ORDER);
$hits = array();
foreach($matches as $match){
$hits[strlen($match[2]).$match[0]] = $match;