PageRenderTime 308ms queryTime 61ms sortTime 55ms getByIdsTime 76ms findMatchingLines 21ms

100+ results results for 'preg_match' (308 ms)

Not the results you expected?
datalib_test.php https://bitbucket.org/kudutest1/moodlegit.git | PHP | 161 lines
                    
42        $newparams = array();
                    
43        preg_match_all('/(?<!:):([a-z][a-z0-9_]*)/', $sql, $named_matches);
                    
44        foreach($named_matches[1] as $param) {
                    
                
index.php https://gitlab.com/Blueprint-Marketing/helpscout-edd | PHP | 191 lines
                    
139				foreach ( $notes as $note ) {
                    
140					if ( preg_match( '/^PayPal Transaction ID: ([^\s]+)/', $note->comment_content, $match ) )
                    
141						$order['paypal_transaction_id'] = $match[1];
                    
                
QueryBuilder.php https://gitlab.com/afzalpotenza/YII_salon | PHP | 184 lines
                    
174        $sql = str_replace(', [', ",\n[", $sql);
                    
175        if (preg_match_all('/^\s*\[(.*?)\]\s+(.*?),?$/m', $sql, $matches)) {
                    
176            foreach ($matches[1] as $i => $c) {
                    
                
Tokenizer.php https://github.com/nattaphat/hgis.git | PHP | 201 lines
                    
45        while (true) {
                    
46            if (preg_match('#\s+#A', $s, $match, 0, $pos)) {
                    
47                $precedingWhitespacePos = $pos;
                    
60
                    
61            if (preg_match('#[+-]?\d*n(?:[+-]\d+)?#A', $s, $match, 0, $pos) && 'n' !== $match[0]) {
                    
62                $sym = substr($s, $pos, strlen($match[0]));
                    
184
                    
185        if (!preg_match('#[^\w\-]#', $s, $match, PREG_OFFSET_CAPTURE, $pos)) {
                    
186            // Goes to end of s
                    
                
IPv6.php https://bitbucket.org/timgws/full-text-rss.git | PHP | 258 lines
                    
235				{
                    
236					if ($ipv4_part >= 0 && $ipv4_part <= 255 && preg_match('/^\d{1,3}$/', $ipv4_part))
                    
237					{
                    
                
Curl.php https://gitlab.com/axeltizon/magento-demopoweraccess | PHP | 196 lines
                    
188    {
                    
189        preg_match($regularExpression, $response, $matches);
                    
190        if (!isset($matches[1])) {
                    
                
FtpServer.php https://gitlab.com/ilyales/vigma | PHP | 304 lines
                    
211		foreach ((array) $this->ftp('nlist', $dir) as $entry) {
                    
212			if ($entry == NULL || $entry === $dir || preg_match('#(^|/)\\.+$#', $entry)) { // intentionally ==
                    
213				continue;
                    
252	{
                    
253		if (preg_match('#^(mkdir|rmdir|unlink|mv|chmod)\s+(\S+)(?:\s+(\S+))?$#', $command, $m)) {
                    
254			if ($m[1] === 'mkdir') {
                    
295			}
                    
296			if (preg_match('#^\w+\(\):\s*(.+)#', $error, $m)) {
                    
297				$error = $m[1];
                    
                
xpdoquery.class.php https://bitbucket.org/orchdork10159/dnsman.ly.git | PHP | 157 lines
                    
56                $ignorealias = is_int($alias);
                    
57                $escape = !preg_match('/\bAS\b/i', $column) && !preg_match('/\./', $column) && !preg_match('/\(/', $column);
                    
58                if ($escape) {
                    
                
SearchController.php https://github.com/suzuki/candycane.git | PHP | 204 lines
                    
60		// Quick jump to an issue by matching #1234 style issue id
                    
61		if (preg_match('/^#?(\d+)$/', $question, $match)) {
                    
62			$conditions = $this->Project->get_visible_by_condition($this->current_user);
                    
                
AnalyzerClassFileSystemLocator.php https://github.com/Proudio-Interactive/pdepend.git | PHP | 196 lines
                    
119        } else {
                    
120            preg_match_all('(:?(([a-z]+://)?[^:]+):?)i', get_include_path(), $match);
                    
121            $paths = $match[1];
                    
                
api.php https://github.com/castlino/linonico.com.git | PHP | 216 lines
                    
87			if (in_array($type, array('behavior', 'component', 'helper')) && $type !== $file) {
                    
88				if (!preg_match('/' . Inflector::camelize($type) . '$/', $class)) {
                    
89					$class .= Inflector::camelize($type);
                    
198
                    
199		if (preg_match_all('%(/\\*\\*[\\s\\S]*?\\*/)(\\s+function\\s+\\w+)(\\(.+\\))%', $contents, $result, PREG_PATTERN_ORDER)) {
                    
200			foreach ($result[2] as $key => $method) {
                    
                
TemplateTask.php https://bitbucket.org/koronios/cakephp.git | PHP | 219 lines
                    
91			foreach ($subDirs as $dir) {
                    
92				if (empty($dir) || preg_match('@^skel$|_skel$@', $dir)) {
                    
93					continue;
                    
                
editer_page.php https://bitbucket.org/pombredanne/spip-zone-treemap.git | PHP | 164 lines
                    
83			$erreurs['composition'] = _T('noizetier:formulaire_identifiant_deja_pris');
                    
84		if (preg_match('#^[a-z0-9_]+$#',$composition)==0)
                    
85			$erreurs['composition'] = _T('noizetier:formulaire_erreur_format_identifiant');
                    
                
agenda_filtres.php https://bitbucket.org/pombredanne/spip-zone-treemap.git | PHP | 211 lines
                    
87	$url_retour = end($args);
                    
88	if (preg_match(';[a-z]{3,5}://;i',$url_retour))
                    
89		array_pop($args);
                    
                
utils.php https://gitlab.com/suporte.spturis/carnaval2015.spturis.com.br | PHP | 237 lines
                    
23
                    
24		if ( \count( $parts ) === 2 && \preg_match( '/^\d+$/', $parts[1] ) === 1 ) {
                    
25			$parts[] = '0';
                    
                
EpiRoute.php https://github.com/williamswebworks/DraftApp.git | PHP | 224 lines
                    
134    {
                    
135      if(preg_match($regex, $this->route, $arguments))
                    
136      {
                    
172    $continue = !empty($url);
                    
173    if($offDomain === false && preg_match('#^https?://#', $url))
                    
174      $continue = false;
                    
                
MonologServiceProviderTest.php https://gitlab.com/Szedrik/rest | PHP | 212 lines
                    
188        foreach ($records as $record) {
                    
189            if (preg_match($pattern, $record['message']) && $record['level'] == $level) {
                    
190                $found = true;
                    
                
class.datasource.dynamic_xml.php https://github.com/nils-werner/symphony-2.git | PHP | 200 lines
                    
84					// Handle any response that is not a 200, or the content type does not include XML, plain or text
                    
85					if((int)$info['http_code'] != 200 || !preg_match('/(xml|plain|text)/i', $info['content_type'])){
                    
86						$writeToCache = false;
                    
                
formatter.php https://gitlab.com/tjaafar/SuiteCRM | PHP | 155 lines
                    
74      	 return $this->_ss->fetch("modules/Connectors/connectors/formatters/{$dir}/tpls/default.tpl");
                    
75      } else if(preg_match('/_soap_/', $class)) {
                    
76      	 return $this->_ss->fetch("include/connectors/formatters/ext/soap/tpls/default.tpl");
                    
                
page_cities.php https://gitlab.com/oytunistrator/jobberbase | PHP | 277 lines
                    
247			else
                    
248				if (preg_match('/([^a-z0-9\-_]+?)/i', $asciiName))
                    
249					$errors['asciiName'] = 'Ascii name must contain only alphanumerical characters, dashes and underscores';
                    
                
ParameterizedHeader.php https://gitlab.com/hoangduys4k5/laravelproject | PHP | 191 lines
                    
116        // If it's not already a valid parameter value...
                    
117        if (!preg_match('/^'.self::TOKEN_REGEX.'$/D', $value)) {
                    
118            // TODO: text, or something else??
                    
119            // ... and it's not ascii
                    
120            if (!preg_match('/^[\x00-\x08\x0B\x0C\x0E-\x7F]*$/D', $value)) {
                    
121                $encoded = true;
                    
126
                    
127            if (\in_array($name, ['name', 'filename'], true) && 'form-data' === $this->getValue() && 'content-disposition' === strtolower($this->getName()) && preg_match('//u', $value)) {
                    
128                // WHATWG HTML living standard 4.10.21.8 2 specifies:
                    
177        $forceHttpQuoting = 'form-data' === $this->getValue() && 'content-disposition' === strtolower($this->getName());
                    
178        if ($forceHttpQuoting || !preg_match('/^'.self::TOKEN_REGEX.'$/D', $value)) {
                    
179            $value = '"'.$value.'"';
                    
                
Batch.php https://bitbucket.org/areeves42/openfisma.git | PHP | 248 lines
                    
208        $errors = null;
                    
209        preg_match_all('/<message (.*)>(.*)<\/message>/', $response->getBody(), $errors);
                    
210
                    
                
auth.php https://bitbucket.org/minaco2/pukiwiki.git | PHP | 228 lines
                    
39	$matches = array();
                    
40	if (preg_match('/^(\{.+\})(.*)$/', $scheme, $matches)) {
                    
41		$scheme = & $matches[1];
                    
183	foreach($auth_pages as $key=>$val)
                    
184		if (preg_match($key, $target_str))
                    
185			$user_list = array_merge($user_list, explode(',', $val));
                    
192		isset($_SERVER['HTTP_AUTHORIZATION']) &&
                    
193		preg_match('/^Basic (.*)$/', $_SERVER['HTTP_AUTHORIZATION'], $matches))
                    
194	{
                    
                
watstemtmijnraad.html https://github.com/openstate/Politix.git | HTML | 143 lines
                    
43						<ul>
                    
44							<li{if preg_match('!^/(\?.*)?$!', $smarty.server.REQUEST_URI)} class="active"{/if}><a href="/">Home</a></li>
                    
45							<li{if preg_match('!^/advsearch/!', $smarty.server.REQUEST_URI)} class="active"{/if}><a href="/advsearch/">Voorstellen</a></li>
                    
45							<li{if preg_match('!^/advsearch/!', $smarty.server.REQUEST_URI)} class="active"{/if}><a href="/advsearch/">Voorstellen</a></li>
                    
46							{*<li{if preg_match('!^/regio/!', $smarty.server.REQUEST_URI)} class="active"{/if}><a href="/regio/">Regio's</a></li>*}
                    
47							<li{if preg_match('!^/about/!', $smarty.server.REQUEST_URI)} class="active"{/if}><a href="/about/">Meer informatie</a></li>
                    
49							{capture assign=regex}'!^/{$p->url}/!'{/capture}
                    
50							<li{if preg_match($regex, $smarty.server.REQUEST_URI)} class="active"{/if}><a href="/{$p->url|urlencode}/">{$p->linkText|htmlentities}</a></li>
                    
51							{/foreach}
                    
                
main.php https://github.com/dgz/shimmie2.git | PHP | 155 lines
                    
49		$text = preg_replace("/\[quote=(.*?)\](.*?)\[\/quote\]/s", "<blockquote><em>\\1 said:</em><br><small>\\2</small></blockquote>", $text);
                    
50		while(preg_match("/\[list\](.*?)\[\/list\]/s", $text))
                    
51			$text = preg_replace("/\[list\](.*?)\[\/list\]/s", "<ul>\\1</ul>", $text);
                    
51			$text = preg_replace("/\[list\](.*?)\[\/list\]/s", "<ul>\\1</ul>", $text);
                    
52		while(preg_match("/\[ul\](.*?)\[\/ul\]/s", $text))
                    
53			$text = preg_replace("/\[ul\](.*?)\[\/ul\]/s", "<ul>\\1</ul>", $text);
                    
53			$text = preg_replace("/\[ul\](.*?)\[\/ul\]/s", "<ul>\\1</ul>", $text);
                    
54		while(preg_match("/\[ol\](.*?)\[\/ol\]/s", $text))
                    
55			$text = preg_replace("/\[ol\](.*?)\[\/ol\]/s", "<ol>\\1</ol>", $text);
                    
                
benc.php https://github.com/cybernet/CyBerFuN-CoDeX.git | PHP | 261 lines
                    
178function bdec($s) {
                    
179	if (preg_match('/^(\d+):/', $s, $m)) {
                    
180		$l = $m[1];
                    
187	}
                    
188	if (preg_match('/^i(\d+)e/', $s, $m)) {
                    
189		$v = $m[1];
                    
                
Proxy.php https://github.com/znarf/nvo.git | PHP | 255 lines
                    
233    {
                    
234        $match = preg_match('%(?:
                    
235            [\xC2-\xDF][\x80-\xBF]              # non-overlong 2-byte
                    
                
XLSX.php https://gitlab.com/VTTE/sitios-vtte | PHP | 178 lines
                    
94            $character = chr($charValue);
                    
95            if (preg_match("/{$this->escapableControlCharactersPattern}/", $character)) {
                    
96                $charHexValue = dechex($charValue);
                    
122        // if no control characters
                    
123        if (!preg_match("/{$this->escapableControlCharactersPattern}/", $escapedString)) {
                    
124            return $escapedString;
                    
                
websocket.class.php https://github.com/captn3m0/ariel.git | PHP | 162 lines
                    
110        //Get the numbers
                    
111        preg_match_all('/([\d]+)/', $key1, $key1_num);
                    
112        preg_match_all('/([\d]+)/', $key2, $key2_num);
                    
116        //Count spaces
                    
117        preg_match_all('/([ ]+)/', $key1, $key1_spc);
                    
118        preg_match_all('/([ ]+)/', $key2, $key2_spc);
                    
131    $r=$h=$o=null;
                    
132    if(preg_match("/GET (.*) HTTP/"               ,$req,$match)){ $r=$match[1]; }
                    
133    if(preg_match("/Host: (.*)\r\n/"              ,$req,$match)){ $h=$match[1]; }
                    
133    if(preg_match("/Host: (.*)\r\n/"              ,$req,$match)){ $h=$match[1]; }
                    
134    if(preg_match("/Origin: (.*)\r\n/"            ,$req,$match)){ $o=$match[1]; }
                    
135    if(preg_match("/Sec-WebSocket-Key1: (.*)\r\n/",$req,$match)){ $this->log("Sec Key1: ".$sk1=$match[1]); }
                    
135    if(preg_match("/Sec-WebSocket-Key1: (.*)\r\n/",$req,$match)){ $this->log("Sec Key1: ".$sk1=$match[1]); }
                    
136    if(preg_match("/Sec-WebSocket-Key2: (.*)\r\n/",$req,$match)){ $this->log("Sec Key2: ".$sk2=$match[1]); }
                    
137    if($match=substr($req,-8))                                                                  { $this->log("Last 8 bytes: ".$l8b=$match); }
                    
                
TestLoader.php https://gitlab.com/merial/WETE_Ryhma3 | PHP | 231 lines
                    
94        foreach (self::$formats as $format) {
                    
95            if (preg_match("~$format.php$~", $path)) {
                    
96                call_user_func([$this, "add$format"], $path);
                    
                
StringParser.php git://github.com/egeniq/adapto.git | PHP | 213 lines
                    
154        $matches = array();
                    
155        preg_match_all("/\[[^\]]*\]|[^[]+/", $this->m_string, $matches);
                    
156        return $matches;
                    
                
ToolbarHelper.php https://bitbucket.org/gwhitcher/cakephp-custom-skeleton.git | PHP | 227 lines
                    
202					$bindParam = $bindType = null;
                    
203					if (preg_match('/.+ :.+/', $query['query'])) {
                    
204						$bindType = true;
                    
                
class.DBInstance.php http://scalr.googlecode.com/svn/ | PHP | 229 lines
                    
119		{
                    
120			preg_match("/^([0-9]+)\.([0-9]+)-([0-9]+)$/", $this->ScalarizrPackageVersion, $matches);
                    
121			return array("major" => $matches[1], "minor" => $matches[2], "revision" => $matches[3]);
                    
125		{
                    
126			preg_match("/^([0-9]+)\.([0-9]+)\-([0-9]+)$/si", $v, $matches);
                    
127			
                    
                
declarer_bases.php https://bitbucket.org/re_al_/real.test.spip.git | PHP | 231 lines
                    
63	while ($f = readdir($d)) {
                    
64		if ((preg_match('/^(.*)[.]php$/', $f, $s))
                    
65			and is_readable($f = $dir . $f)
                    
122	$login_db = $pass_db = '';
                    
123	if (!preg_match(',^sqlite,i', $serveur_db)) {
                    
124		if (!$login_db = _request('login_db')) {
                    
204	$adresse_db = _DECLARER_ADRESSE_DB;
                    
205	if (preg_match(',(.*):(.*),', $adresse_db, $r)) {
                    
206		list(, $adresse_db, $port) = $r;
                    
                
ComponentContainer.php git://github.com/jakubkulhan/shopaholic.git | PHP | 271 lines
                    
69
                    
70		} elseif (!preg_match('#^[a-zA-Z0-9_]+$#', $name)) {
                    
71			throw new InvalidArgumentException("Component name must be non-empty alphanumeric string, '$name' given.");
                    
                
makepot-praized.php http://praized.googlecode.com/svn/trunk/ | PHP | 209 lines
                    
102		$placeholders = array();
                    
103		if (preg_match('/\$wp_version\s*=\s*\'(.*?)\';/', file_get_contents($dir.'/wp-includes/version.php'), $matches)) {
                    
104			$placeholders['version'] = $matches[1];
                    
111		$placeholders = array();
                    
112		if (preg_match('/\$wpmu_version\s*=\s*\'(.*?)\';/', file_get_contents($dir.'/wp-includes/version.php'), $matches)) {
                    
113			$placeholders['version'] = $matches[1];
                    
121		$placeholders = array();
                    
122		if (preg_match('/case\s+\'version\'.*?return\s+\'(.*?)\';/s', file_get_contents($dir.'/bb-includes/functions.php'), $matches)) {
                    
123			$placeholders['version'] = $matches[1];
                    
146	function get_addon_header($header, &$source) {
                    
147		if (preg_match('|'.$header.':(.*)$|mi', $source, $matches))
                    
148			return trim($matches[1]);
                    
                
display.php https://gitlab.com/potion/librechan | PHP | 528 lines
                    
59
                    
60	if ($config['boardlist_wrap_bracket'] && !preg_match('/\] $/', $body))
                    
61		$body = '[' . $body . ']';
                    
218	if ($lines > $max_lines) {
                    
219		if (preg_match('/(((.*?)<br\/>){' . $max_lines . '})/', $body, $m))
                    
220			$body = $m[0];
                    
229		// Open tags
                    
230		if (preg_match_all('/<([\w]+)[^>]*>/', $body, $open_tags)) {
                    
231			
                    
233			for ($x=0;$x<count($open_tags[0]);$x++) {
                    
234				if (!preg_match('/\/(\s+)?>$/', $open_tags[0][$x]))
                    
235					$tags[] = $open_tags[1][$x];
                    
238			// List successfully closed tags
                    
239			if (preg_match_all('/(<\/([\w]+))>/', $body, $closed_tags)) {
                    
240				for ($x=0;$x<count($closed_tags[0]);$x++) {
                    
                
class-wp-embed.php https://gitlab.com/WPonEB/WPonEB | PHP | 479 lines
                    
170			foreach ( $handlers as $id => $handler ) {
                    
171				if ( preg_match( $handler['regex'], $url, $matches ) && is_callable( $handler['callback'] ) ) {
                    
172					if ( false !== $return = call_user_func( $handler['callback'], $matches, $attr, $url, $rawattr ) )
                    
390
                    
391		if ( preg_match( '#(^|\s|>)https?://#i', $content ) ) {
                    
392			// Find URLs on their own line.
                    
                
Input.php https://gitlab.com/devdoblea/factutextil.local | PHP | 425 lines
                    
254						if (isset($properties['IMAGE-RESOLUTION'])) {
                    
255							if (preg_match('/from-image/i', $properties['IMAGE-RESOLUTION']) && isset($info['set-dpi']) && $info['set-dpi'] > 0) {
                    
256								$w *= $this->mpdf->img_dpi / $info['set-dpi'];
                    
257								$h *= $this->mpdf->img_dpi / $info['set-dpi'];
                    
258							} elseif (preg_match('/(\d+)dpi/i', $properties['IMAGE-RESOLUTION'], $m)) {
                    
259								$dpi = $m[1];
                    
                
fckeditor_php4.php http://avecms.googlecode.com/svn/trunk/ | PHP | 267 lines
                    
64	}
                    
65	else if ( preg_match( "|AppleWebKit/(\d+)|i", $sAgent, $matches ) )
                    
66	{
                    
                
DateTime.php https://hg01.codeplex.com/odataphpproducer | PHP | 234 lines
                    
68        //2. Month and day should be two digit
                    
69        if (!preg_match("/^datetime\'(\d{4})-(\d{2})-(\d{2})((\s|T)([0-1][0-9]|2[0-4]):([0-5][0-9])(:([0-5][0-9])([Z])?)?)?\'$/", strval($value), $matches)
                    
70        ) {
                    
                
api_file.php https://github.com/andreking2/api_generator.git | PHP | 521 lines
                    
126	public function read($path) {
                    
127		if (preg_match('|\.\.|', $path)) {
                    
128			return array(array(), array());
                    
197			foreach ($fileList as $i => $file) {
                    
198				if (!preg_match($extPattern, $file)) {
                    
199					unset($fileList[$i]);
                    
249		$docs = array('class' => array(), 'function' => array());
                    
250		if (preg_match('|\.\.|', $filePath)) {
                    
251			return $docs;
                    
346		}
                    
347		preg_match_all($pattern, $fileContent, $matches, PREG_SET_ORDER);
                    
348
                    
369		$funcNames = implode('|', $this->_definedFunctions);
                    
370		preg_match_all('/^\t*function\s*(' . $funcNames . ')[\s|\(]+/mi', $fileContent, $matches, PREG_SET_ORDER);
                    
371		foreach ($matches as $function) {
                    
                
Console.php https://github.com/albertobraschi/NFS.git | PHP | 481 lines
                    
194                // Try to determine the width through stty
                    
195                if (preg_match('#\d+ (\d+)#', @shell_exec('stty size'), $match) === 1) {
                    
196                    $this->_width = (int) $match[1];
                    
196                    $this->_width = (int) $match[1];
                    
197                } else if (preg_match('#columns = (\d+);#', @shell_exec('stty'), $match) === 1) {                       
                    
198                    $this->_width = (int) $match[1];
                    
                
wfNotification.php https://bitbucket.org/youresolutions/sheffieldcareservices.yes1.co.uk.git | PHP | 160 lines
                    
60			
                    
61			if (preg_match('/^release/i', $category) && !$notification_productUpdates) { $n->markAsRead(); }
                    
62			if (preg_match('/^digest/i', $category) && !$notification_blogHighlights) { $n->markAsRead(); }
                    
62			if (preg_match('/^digest/i', $category) && !$notification_blogHighlights) { $n->markAsRead(); }
                    
63			if (preg_match('/^alert/i', $category) && !$notification_securityAlerts) { $n->markAsRead(); }
                    
64			if (preg_match('/^promo/i', $category) && !$notification_promotions) { $n->markAsRead(); }
                    
115			
                    
116			if (preg_match('/^release/i', $category) && !$notification_productUpdates) { return; }
                    
117			if (preg_match('/^digest/i', $category) && !$notification_blogHighlights) { return; }
                    
117			if (preg_match('/^digest/i', $category) && !$notification_blogHighlights) { return; }
                    
118			if (preg_match('/^alert/i', $category) && !$notification_securityAlerts) { return; }
                    
119			if (preg_match('/^promo/i', $category) && !$notification_promotions) { return; }
                    
                
Array.php git://github.com/atk4/atk4.git | PHP | 212 lines
                    
181                $pattern = '/^' . str_replace('%', '.*', preg_quote($expected, '/')) . '$/i';
                    
182                return (bool) preg_match($pattern, $value);
                    
183            default:
                    
                
BackendActivateController.php https://github.com/koala-framework/koala-framework.git | PHP | 152 lines
                    
10            $code = $this->_getParam('code');
                    
11            if (!preg_match('#^(.*)-(\w*)$#', $code, $m)) {
                    
12                $this->getRequest()->setParam('errorMessage', trlKwf("Activation code is invalid. Maybe the URL wasn't copied completely?"));
                    
                
ShallowParser.php https://bitbucket.org/leiweiqiang/tra-ai-pm.git | PHP | 233 lines
                    
115  private function _initializeHeredoc($result) {
                    
116    if (preg_match('/^([\'"]?)([a-z_][a-z0-9_]*)\\1/i', $result->buffer, $match)) {
                    
117      $docId = $match[2];
                    
129  private function _scanWsp($result) {
                    
130    if (preg_match('/^\s+/', $result->buffer, $match)) {
                    
131      if (!empty($result->statements) && $result->stmt === '') {
                    
145    if (($result->state == '"' || $result->state == "'")
                    
146        && preg_match('/^[^' . $result->state . ']*?\\\\./s', $result->buffer, $match)) {
                    
147
                    
158    if (in_array($result->state, array('"', "'", '<<<', '//', '#', '/*'))) {
                    
159      if (preg_match($result->terminator, $result->buffer, $match)) {
                    
160        $result->stmt .= $match[1];
                    
173  private function _scanStateEntrant($result) {
                    
174    if (preg_match($this->_initials, $result->buffer, $match)) {
                    
175      $result->stmt .= $match[0];
                    
                
context.php git://github.com/m3talsmith/php-liquid.git | PHP | 326 lines
                    
187		
                    
188		if (preg_match('/^\'(.*)\'$/', $key, $matches)) {
                    
189			return $matches[1];
                    
191
                    
192		if (preg_match('/^"(.*)"$/', $key, $matches)) {
                    
193			return $matches[1];
                    
195
                    
196		if (preg_match('/^(\d+)$/', $key, $matches)) {
                    
197			return $matches[1];
                    
199
                    
200		if (preg_match('/^(\d[\d\.]+)$/', $key, $matches)) {
                    
201			return $matches[1];
                    
                
SqliteSchema.php https://gitlab.com/0072016/0072016-fbphp | PHP | 483 lines
                    
44    {
                    
45        preg_match('/(unsigned)?\s*([a-z]+)(?:\(([0-9,]+)\))?/i', $column, $matches);
                    
46        if (empty($matches)) {
                    
172        // Remove quotes
                    
173        if (preg_match("/^'(.*)'$/", $default, $matches)) {
                    
174            return str_replace("''", "'", $matches[1]);
                    
                
Regex.php https://bitbucket.org/dannyelps/rea.git | PHP | 319 lines
                    
63    {
                    
64        if (preg_match('/^(.{3,}?)([imsxuADU]*)$/', $expr, $m)) {
                    
65            $start = substr($m[1], 0, 1);
                    
68            if (
                    
69                ($start === $end && !preg_match('/[*?[:alnum:] \\\\]/', $start))
                    
70                || ('{' === $start && '}' === $end)
                    
                
MysqlSchemaParser.php https://bitbucket.org/aagraz/propel.git | PHP | 427 lines
                    
190        $/x';
                    
191        if (preg_match($regexp, $row['Type'], $matches)) {
                    
192            $nativeType = $matches[1];
                    
210            }
                    
211        } elseif (preg_match('/^(\w+)\(/', $row['Type'], $matches)) {
                    
212            $nativeType = $matches[1];
                    
220        //BLOBs can't have any default values in MySQL
                    
221        $default = preg_match('~blob|text~', $nativeType) ? null : $row['Default'];
                    
222
                    
283        $regEx = '/CONSTRAINT `([^`]+)` FOREIGN KEY \((.+)\) REFERENCES `([^`]*)` \((.+)\)(.*)/';
                    
284        if (preg_match_all($regEx, $row[1], $matches)) {
                    
285            $tmpArray = array_keys($matches[0]);
                    
312                        $result = null;
                    
313                        preg_match('/' . $fkaction . ' (' . ForeignKey::CASCADE . '|' . ForeignKey::SETNULL . ')/', $fkey, $result);
                    
314                        if ($result && is_array($result) && isset($result[1])) {
                    
                
settings_time.php https://gitlab.com/php-fusion/PHP-Fusion.git | PHP | 139 lines
                    
78	foreach ($zones as $zone) {
                    
79		if (preg_match('/^(America|Antartica|Arctic|Asia|Atlantic|Europe|Indian|Pacific)\//', $zone['timezone_id'])) {
                    
80			if (!in_array($zone['timezone_id'], $timezoneArray)) {
                    
                
Request.php https://gitlab.com/dkatolicky/zacatecnice | PHP | 334 lines
                    
315		rsort($langs);             // first more specific
                    
316		preg_match_all('#(' . implode('|', $langs) . ')(?:-[^\s,;=]+)?\s*(?:;\s*q=([0-9.]+))?#', $s, $matches);
                    
317
                    
                
bot_jcalpro_latest_events.php https://gitlab.com/endomorphosis/OLAAaction | PHP | 176 lines
                    
53  // try old style, pre-version 2.1 syntax for calling plugin : {jcal_latest}cat1,cat2,cat3{/jcal_latest}
                    
54  if (preg_match_all( $preV21RegExp, $rowContent->text, $matches, PREG_SET_ORDER) > 0) {
                    
55    foreach( $matches as $match) {
                    
69    // new syntax as of Jcal 2.1 {jcal_latest cat=n show_description=yes ...}
                    
70    if (preg_match_all( $regExp, $rowContent->text, $matches, PREG_SET_ORDER) > 0) {
                    
71      foreach( $matches as $match) {
                    
                
PhpSecInfo.php https://github.com/quarkness/piwik.git | PHP | 591 lines
                    
230		while (false !== ($entry = $test_root->read())) {
                    
231			if ( is_dir($test_root->path.DIRECTORY_SEPARATOR.$entry) && !preg_match('~^(\.|_vti)(.*)$~', $entry) ) {
                    
232				$test_dirs[] = $entry;
                    
                
18111.php https://bitbucket.org/DinoRex99/exploit-database.git | PHP | 157 lines
                    
82    
                    
83    if (!preg_match('/currentFolderPath" value="([^"]*)"/', http_send($host, $packet), $m)) die("\n[-] Root folder path not found!\n");
                    
84    return $m[1];
                    
128
                    
129if (!preg_match("/Set-Cookie: ([^;]*);/", http_send($host, $packet), $sid)) die("\n[-] Session ID not found!\n");
                    
130
                    
152    if (($cmd = trim(fgets(STDIN))) == "exit") break;
                    
153    preg_match("/_code_(.*)/s", http_send($host, sprintf($packet, base64_encode($cmd))), $m) ?
                    
154    print $m[1] : die("\n[-] Exploit failed!\n");
                    
                
rss-importer.php https://bitbucket.org/babinkochana/triptrills.git | PHP | 227 lines
                    
76
                    
77		preg_match_all('|<item>(.*?)</item>|is', $importdata, $this->posts);
                    
78		$this->posts = $this->posts[1];
                    
80		foreach ($this->posts as $post) {
                    
81			preg_match('|<title>(.*?)</title>|is', $post, $post_title);
                    
82			$post_title = str_replace(array('<![CDATA[', ']]>'), '', $wpdb->escape( trim($post_title[1]) ));
                    
83
                    
84			preg_match('|<pubdate>(.*?)</pubdate>|is', $post, $post_date_gmt);
                    
85
                    
89				// if we don't already have something from pubDate
                    
90				preg_match('|<dc:date>(.*?)</dc:date>|is', $post, $post_date_gmt);
                    
91				$post_date_gmt = preg_replace('|([-+])([0-9]+):([0-9]+)$|', '\1\2\3', $post_date_gmt[1]);
                    
98
                    
99			preg_match_all('|<category>(.*?)</category>|is', $post, $categories);
                    
100			$categories = $categories[1];
                    
                
VersionInformation.php https://bitbucket.org/dprograma/laravelweb.git | PHP | 228 lines
                    
106            $matches = array();
                    
107            if (preg_match('/^(\D+)(\d+)$/', $suffix, $matches)) {
                    
108                $suffix = $matches[1];
                    
                
Batch.php https://gitlab.com/cakephp-2-x-plugins/zendframework.git | PHP | 241 lines
                    
200        $errors = null;
                    
201        preg_match_all('/<message (.*)>(.*)<\/message>/', $response->getBody(), $errors);
                    
202        
                    
                
readmes.inc.php https://gitlab.com/Gashler/sg | PHP | 233 lines
                    
70									{
                    
71										preg_match ("/(\=\= )(" . preg_quote ($specific_section, "/") . ")( \=\=)(.+?)([\r\n]+\=\= |$)/si", $rm, $m);
                    
72
                    
225
                    
226								preg_match ("/(^)(" . preg_quote ($key, "/") . ")(\:)( )(.+?)($)/m", $readme[$path], $m);
                    
227
                    
                
task.php https://gitlab.com/alexprowars/bitrix | PHP | 534 lines
                    
47		{
                    
48			if (preg_match("/[^A-Z]/i", $arFields['LETTER']) || strlen($arFields['LETTER']) > 1)
                    
49				$arMsg[] = array("id"=>"LETTER", "text"=> GetMessage('MAIN_TASK_WRONG_LETTER'));
                    
440
                    
441		if(preg_match("/[^a-z0-9._]/i", $module))
                    
442		{
                    
                
user.php https://gitlab.com/alexprowars/bitrix | PHP | 556 lines
                    
162
                    
163		if (preg_match('/^(?<domain>.+):(?<port>\d+)$/', $domain, $matches))
                    
164		{
                    
231
                    
232			if (preg_match('/^(?<domain>.+):(?<port>\d+)$/', $domain, $matches))
                    
233				$domain = $matches['domain'];
                    
245	{
                    
246		if (!preg_match('/^(?<type>rpl|fwd)(?<token>[a-z0-9]+)@(?<domain>.+)/i', $to, $matches))
                    
247		{
                    
465		{
                    
466			if(preg_match("/\\.bitrix24\\.([a-z]+|com\\.br)$/i", BX24_HOST_NAME))
                    
467			{
                    
                
List.php https://github.com/wrobel/horde.git | PHP | 496 lines
                    
225            $page = Horde_Util::getFormData('page', '*');
                    
226            if (!preg_match('/^[A-Za-z*]$/', $page)) {
                    
227                $page = '*';
                    
230                $page = Horde_Util::getFormData('page', 'A');
                    
231                if (!preg_match('/^[A-Za-z*]$/', $page)) {
                    
232                    $page = 'A';
                    
                
AddressRule.php https://github.com/yinhm/sugarcrm.git | PHP | 153 lines
                    
76	              $field = is_array($column) ? $column['name'] : $column;
                    
77	              preg_match('/^(.*?)_address_/si', $field, $matches);
                    
78	               
                    
                
upgradelib.php https://github.com/kpike/moodle.git | PHP | 304 lines
                    
65
                    
66        } else if (preg_match("|$CFG->wwwroot/file.php(\?file=)?/$siteid(/[^\s'\"&\?#]+)|", $path, $matches)) {
                    
67            // public site files
                    
87
                    
88        } else if (preg_match("|$CFG->wwwroot/file.php(\?file=)?/$candidate->course(/[^\s'\"&\?#]+)|", $path, $matches)) {
                    
89            // current course files
                    
122            // get rid of any extra url parameters, sorry we can not support these
                    
123            preg_match("/^[^?#]+/", $path, $matches);
                    
124            $parts = $matches[0];
                    
                
Base.php https://gitlab.com/jamie/ussocialforum.git | PHP | 245 lines
                    
218    foreach ($excludeStrings as $string) {
                    
219      if (preg_match('/(\s' . $string . ')|(' . $string . '\s)/i', $sql)) {
                    
220        CRM_Core_Error::fatal(ts('Found illegal \'%1\' string in SQL clause.',
                    
                
404.php https://gitlab.com/iulian/immigration-australia-forum.git | PHP | 251 lines
                    
136
                    
137        if(preg_match("#^{$pattern}\$#", $label))
                    
138        {
                    
                
Node.php https://bitbucket.org/audax/testmaker-mod | PHP | 275 lines
                    
69		$id = str_replace (' ', '', $id);
                    
70		if (!preg_match('/^[0-9]+$/', $id))
                    
71		{
                    
                
voucher_theme.php https://bitbucket.org/DidenkoDima/opta.git | PHP | 152 lines
                    
122		if ($date) {
                    
123			if (preg_match('/^(!=|<>)\s*(\d{2,4}-\d{1,2}-\d{1,2})$/', html_entity_decode(trim($filter)), $matches) && count($matches) == 3) {
                    
124				return "DATE($field) <> DATE('" . $matches[2] . "')";
                    
124				return "DATE($field) <> DATE('" . $matches[2] . "')";
                    
125			} else if (preg_match('/^(\d{2,4}-\d{1,2}-\d{1,2})\s*(<|<=)\s*(\d{2,4}-\d{1,2}-\d{1,2})$/', html_entity_decode(trim($filter)), $matches) && count($matches) == 4 && strtotime($matches[1]) <= strtotime($matches[3])) {
                    
126				return "DATE('" . $matches[1] . "') ${matches[2]} DATE($field) AND DATE($field) ${matches[2]} DATE('" . $matches[3] . "')";
                    
126				return "DATE('" . $matches[1] . "') ${matches[2]} DATE($field) AND DATE($field) ${matches[2]} DATE('" . $matches[3] . "')";
                    
127			} else if (preg_match('/^(\d{2,4}-\d{1,2}-\d{1,2})\s*(>|>=)\s*(\d{2,4}-\d{1,2}-\d{1,2})$/', html_entity_decode(trim($filter)), $matches) && count($matches) == 4 && strtotime($matches[1]) >= strtotime($matches[3])) {
                    
128				return "DATE('" . $matches[1] . "') ${matches[2]} DATE($field) AND DATE($field) ${matches[2]} DATE('" . $matches[3] . "')";
                    
128				return "DATE('" . $matches[1] . "') ${matches[2]} DATE($field) AND DATE($field) ${matches[2]} DATE('" . $matches[3] . "')";
                    
129			} else if (preg_match('/^(<|<=|>|>=)\s*(\d{2,4}-\d{1,2}-\d{1,2})$/', html_entity_decode(trim($filter)), $matches) && count($matches) == 3) {
                    
130				return "DATE($field) ${matches[1]} DATE('" . $matches[2] . "')";
                    
130				return "DATE($field) ${matches[1]} DATE('" . $matches[2] . "')";
                    
131			} else if (preg_match('/^(\d{2,4}-\d{1,2}-\d{1,2})\s*(>|>=|<|<=)$/', html_entity_decode(trim($filter)), $matches) && count($matches) == 3) {
                    
132				return "DATE('" . $matches[1] . "') ${matches[2]} DATE($field)";
                    
                
generate_utf_tables.php https://bitbucket.org/enitarzi/phpbb3-gorgon.git | PHP | 571 lines
                    
118	*/
                    
119	if (!preg_match('#^NFK?C_QC$#', $p[1]))
                    
120	{
                    
189
                    
190	if (!isset($p[5]) || !preg_match_all('#[0-9A-F]+#', strip_tags($p[5]), $m))
                    
191	{
                    
319
                    
320			if (preg_match('#^LATIN.*(?:LETTER|LIGATURE) ([A-Z]{2}(?![A-Z]))$#', $m[1], $capture))
                    
321			{
                    
                
capabilities.php https://github.com/weissms/owb-mirror.git | PHP | 485 lines
                    
224	function level_reduction($max, $item) {
                    
225		if(preg_match('/^level_(10|[0-9])$/i', $item, $matches)) {
                    
226			$level = intval($matches[1]);
                    
                
blog-video.php https://gitlab.com/tylerjheslop/acaneandwickerfixer | PHP | 125 lines
                    
72                    }
                    
73                    preg_match('/<iframe.*src=\"([^\"]*)\".*><\/iframe>/', $html, $matches);
                    
74                    preg_match('%(?:youtube(?:-nocookie)?\.com/(?:[^/]+/.+/|(?:v|e(?:mbed)?)/|.*[?&]v=)|youtu\.be/)([^"&?/ ]{11})%i', $matches[1], $match);
                    
                
UserTest.php https://gitlab.com/my-application.bjoernbartels.earth/ZfcUser | PHP | 367 lines
                    
95        foreach ($queryStack as $query) {
                    
96            if (!preg_match('/\S+/', $query)) {
                    
97                continue;
                    
                
Term.php https://github.com/gryzz/crystal_magento.git | PHP | 341 lines
                    
147        /** @todo check for PCRE unicode support may be performed through Zend_Environment in some future */
                    
148        if (@preg_match('/\pL/u', 'a') == 1) {
                    
149            $word = iconv($this->_encoding, 'UTF-8', $this->_word);
                    
252        /** @todo check for PCRE unicode support may be performed through Zend_Environment in some future */
                    
253        if (@preg_match('/\pL/u', 'a') == 1) {
                    
254            $word = iconv($this->_encoding, 'UTF-8', $this->_word);
                    
                
field.php https://gitlab.com/redring-co-in/redring_website.git | PHP | 298 lines
                    
181		} else {
                    
182			if ( preg_match( '/<[^\>]+>/', $default ) ) {
                    
183				echo '' . $default;
                    
                
TableTest.php https://gitlab.com/DEVLINE/magento2.git | PHP | 213 lines
                    
52            $regexp = self::$method($filePath);
                    
53            if (!preg_match_all($regexp, $content, $matches, PREG_SET_ORDER)) {
                    
54                continue;
                    
                
CreateConfigurable.php https://gitlab.com/DEVLINE/magento2.git | PHP | 168 lines
                    
164        }
                    
165        preg_match("~Location: [^\s]*\/id\/(\d+)~", $response, $matches);
                    
166        return isset($matches[1]) ? $matches[1] : null;
                    
                
BreakpointGroup.php https://github.com/jessebeach/drupal.git | PHP | 215 lines
                    
138    // Check for illegal characters in breakpoint group source.
                    
139    if (preg_match('/[^a-z_]+/', $this->source) || empty($this->source)) {
                    
140      throw new InvalidBreakpointSourceException(format_string("Invalid value '@source' for breakpoint group source property. Breakpoint group source property can only contain lowercase letters and underscores.", array('@source' => $this->source)));
                    
142    // Check for illegal characters in breakpoint group name.
                    
143    if (preg_match('/[^a-z0-9_]+/', $this->name || empty($this->name))) {
                    
144      throw new InvalidBreakpointNameException(format_string("Invalid value '@name' for breakpoint group name property. Breakpoint group name property can only contain lowercase letters, numbers and underscores.", array('@name' => $this->name)));
                    
                
Router.php https://bitbucket.org/jnewing/egs.git | PHP | 298 lines
                    
223
                    
224			if (preg_match('#^'.$key.'$#', $uri))
                    
225			{
                    
                
inflector_helper.php https://bitbucket.org/jdhall75/skillsdemo.git | PHP | 235 lines
                    
93		{
                    
94			if (preg_match($rule, $result))
                    
95			{
                    
150		{
                    
151			if (preg_match($rule, $result))
                    
152			{
                    
                
migrate.php https://github.com/demonio/KuMigrate-aka-Migra-a.git | PHP | 219 lines
                    
192					
                    
193					if ( ! preg_match('/\d+/', $path) and ! strstr($file, $path) ) break; # CONTROL DE RUTAS
                    
194					
                    
                
class-oembed.php https://gitlab.com/Blueprint-Marketing/wordpress-unit-tests | PHP | 326 lines
                    
90
                    
91			if ( preg_match( $matchmask, $url ) ) {
                    
92				$provider = str_replace( '{format}', 'json', $providerurl ); // JSON is easier to deal with than XML
                    
136
                    
137			if ( $tagfound && preg_match_all( '/<link([^<>]+)>/i', $html, $links ) ) {
                    
138				foreach ( $links[1] as $link ) {
                    
                
Db.php https://github.com/guiohm/magento-french.git | PHP | 415 lines
                    
120        $matches = array();
                    
121        preg_match_all($regExp, $row['Create Table'], $matches, PREG_SET_ORDER);
                    
122
                    
                
Signature.php https://github.com/miamiruby/cakestuff.git | PHP | 179 lines
                    
123            
                    
124            if (preg_match($specialtyRegex, $actionableName, $matches)) {
                    
125                $actionableMethods[$methodName]['actionName'] = $matches[1];
                    
150            if (($docComment = $method->getDocComment()) != '' && 
                    
151                (preg_match_all('/@param\s+(\w+)+\s+(\$\S+)\s+(.*?)(?=(?:\*\s*@)|(?:\*\/))/s', $docComment, $matches)))
                    
152            {
                    
                
Typography.php https://bitbucket.org/mbaily/tremain.git | PHP | 410 lines
                    
86		{
                    
87			if (preg_match_all("#(<!\-\-.*?\-\->)#s", $str, $matches))
                    
88			{
                    
141			// Well also set the "process" flag which allows us to skip <pre> tags and a few other things.
                    
142			if (preg_match("#<(/*)(".$this->block_elements.").*?>#", $chunk, $match))
                    
143			{
                    
143			{
                    
144				if (preg_match("#".$this->skip_elements."#", $match[2]))
                    
145				{
                    
174		// No opening block level tag?  Add it if needed.
                    
175		if ( ! preg_match("/^\s*<(?:".$this->block_elements.")/i", $str))
                    
176		{
                    
                
url_helper.php https://bitbucket.org/mbaily/tremain.git | PHP | 610 lines
                    
145		{
                    
146			$site_url = ( ! preg_match('!^\w+://! i', $uri)) ? site_url($uri) : $uri;
                    
147		}
                    
186
                    
187		$site_url = ( ! preg_match('!^\w+://! i', $uri)) ? site_url($uri) : $uri;
                    
188
                    
380		{
                    
381			if (preg_match_all("#(^|\s|\()((http(s?)://)|(www\.))(\w+[^\s\)\<]+)#i", $str, $matches))
                    
382			{
                    
387					$period = '';
                    
388					if (preg_match("|\.$|", $matches['6'][$i]))
                    
389					{
                    
408		{
                    
409			if (preg_match_all("/([a-zA-Z0-9_\.\-\+]+)@([a-zA-Z0-9\-]+)\.([a-zA-Z0-9\-\.]*)/i", $str, $matches))
                    
410			{
                    
                
util.php https://github.com/migmartri/feeder.git | PHP | 213 lines
                    
86  
                    
87    if((!preg_match('/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/' ,$url)) && (strlen($url) > 0)) {
                    
88      array_push($GLOBALS["errors"], $msg);
                    
130          $addr_spec = "$local_part\\x40$domain";
                    
131          return preg_match("!^$addr_spec$!", $email) ? 1 : 0;
                    
132      }
                    
                
Atom.php https://github.com/Zefiryn/graduationprojects.git | PHP | 444 lines
                    
288		if (!Zend_Uri::check($this->getDataContainer()->getId()) &&
                    
289		!preg_match("#^urn:[a-zA-Z0-9][a-zA-Z0-9\-]{1,31}:([a-zA-Z0-9\(\)\+\,\.\:\=\@\;\$\_\!\*\-]|%[0-9a-fA-F]{2})*#",
                    
290		$this->getDataContainer()->getId()
                    
308	{
                    
309		if (preg_match('/^tag:(?<name>.*),(?<date>\d{4}-?\d{0,2}-?\d{0,2}):(?<specific>.*)(.*:)*$/', $id, $matches)) {
                    
310			$dvalid = false;
                    
                
change_password.php https://github.com/gobsInternetTechnologyGmbH/private_sales.git | PHP | 412 lines
                    
63        !empty($HTTP_REFERER)
                    
64        && !preg_match('/change_password.php|help.php\?section=Password_Recovery|error_message.php\?/', $HTTP_REFERER)
                    
65        && func_is_internal_url($HTTP_REFERER)
                    
                
Modifier.php https://github.com/dg/texy.git | PHP | 248 lines
                    
71			if ($ch === '(') { // title
                    
72				preg_match('#(?:\\\\\)|[^)\n])++\)#', $s, $m, 0, $p);
                    
73				$this->title = Helpers::unescapeHtml(str_replace('\)', ')', trim(substr($m[0], 1, -1))));
                    
                
ssl-in.inc.php https://gitlab.com/Gashler/dp | PHP | 169 lines
                    
100
                    
101												$s = (strtolower($m[1]) === "link" && preg_match /* These are fine to leave like they are. */("/['\"](?:alternate|profile|pingback|EditURI|wlwmanifest|prev|next)['\"]/i", $m[0])) ? $m[0] : $s;
                    
102
                    
                
Parser.php https://github.com/humansky/qframe.git | PHP | 219 lines
                    
198  private function get_indent_level($line) {
                    
199    if(is_null($this->indent_string) && preg_match('/^\s+/', $line, $matches)) {
                    
200      $this->indent_string = $matches[0];
                    
204      $whitespace = self::whitespace($line);
                    
205      return preg_match_all('/' . $this->indent_string . '/', $whitespace, $matches);
                    
206    }
                    
216  private static function whitespace($str) {
                    
217    return (preg_match('/^\s+/', $str, $matches)) ? $matches[0] : '';
                    
218  }
                    
                
sfWebDebugPanelView.class.php https://github.com/bheneka/gitta.git | PHP | 366 lines
                    
86        &&
                    
87        preg_match('/^Render "(.*)"$/', $log['message'], $match)
                    
88      )
                    
319    $sep = preg_quote(DIRECTORY_SEPARATOR);
                    
320    if (preg_match('#modules'.$sep.'(\w+)'.$sep.'templates'.$sep.'(.*)$#', $path, $match))
                    
321    {
                    
                
Twitter.php https://github.com/dingram/phergie.git | PHP | 212 lines
                    
137
                    
138	    } else if (preg_match('/^https?:\/\/(www\.)?twitter\.com/i', $tweeter)) {
                    
139	        if (stripos($tweeter, 'status') !== false) {
                    
199
                    
200        if (preg_match('#^/(.*?)/status(es)?/([0-9]+)$#', $parsed['path'], $matches)
                    
201        ) {
                    
                
SpdxLicense.php https://gitlab.com/sea-light/composer.git | PHP | 233 lines
                    
159            foreach ($tokens as $name => $token) {
                    
160                if (false === $r = preg_match('{' . $token . '}', $license, $matches, PREG_OFFSET_CAPTURE, $offset)) {
                    
161                    throw new \RuntimeException('Pattern for token %s failed (regex error).', $name);
                    
                
module.tag.id3v1.php https://gitlab.com/WPonEB/WPonEB | PHP | 381 lines
                    
68				foreach ($valuearray as $key => $value) {
                    
69					if (preg_match('#^[\\x00-\\x40\\xA8\\B8\\x80-\\xFF]+$#', $value)) {
                    
70						foreach (array('Windows-1251', 'KOI8-R') as $id3v1_bad_encoding) {
                    
                
tuto6.htm https://bitbucket.org/glaucomunsberg/kenobi.git | HTML | 165 lines
                    
61                {
                    
62                    if(</span>preg_match<span class="kw">(</span><span class="str">'/([^=]*)=["\']?([^"\']*)/'</span><span class="kw">,</span>$v<span class="kw">,</span>$a3<span class="kw">))
                    
63                        </span>$attr<span class="kw">[</span>strtoupper<span class="kw">(</span>$a3<span class="kw">[</span>1<span class="kw">])] = </span>$a3<span class="kw">[</span>2<span class="kw">];
                    
                
wpseo-functions.php https://bitbucket.org/geniusdivision/genius-division-wordpress-theme.git | PHP | 388 lines
                    
209
                    
210	if ( isset( $wp_query->query_vars['post_type'] ) && preg_match_all( '/%%pt_([^%]+)%%/u', $string, $matches, PREG_SET_ORDER ) ) {
                    
211		$pt        = get_post_type_object( $wp_query->query_vars['post_type'] );
                    
220
                    
221	if ( preg_match_all( '/%%cf_([^%]+)%%/u', $string, $matches, PREG_SET_ORDER ) ) {
                    
222		global $post;
                    
227
                    
228	if ( preg_match_all( '/%%ct_desc_([^%]+)?%%/u', $string, $matches, PREG_SET_ORDER ) ) {
                    
229		global $post;
                    
235
                    
236	if ( preg_match_all( '/%%ct_([^%]+)%%(single%%)?/u', $string, $matches, PREG_SET_ORDER ) ) {
                    
237		foreach ( $matches as $match ) {
                    
                
MessageDispositionNotificationPart.php https://gitlab.com/rsilveira1987/Expresso | PHP | 305 lines
                    
117    {
                    
118        preg_match('/[[:alnum:]-_]+$/', $_foundType, $type);
                    
119
                    
148    {
                    
149        preg_match('/[[:alnum:]-_]+\/[[:alnum:]-_]+;/', $_foundDisposition, $mode);
                    
150
                    
190            //Final-Recipient (Required)
                    
191            preg_match('/Final-Recipient:\s*[[:alnum:]-_]+;\s*(.+?)\x0D\x0A/', $perRecipients, $matches);
                    
192
                    
207            //Disposition action type mapping
                    
208            preg_match('/Disposition:\s[[:alnum:]-_]+\/[[:alnum:]-_]+;\s[[:alnum:]-_]+/', $perRecipients, $foundDisposition);
                    
209
                    
294    public function getCustomMessage(){
                    
295        preg_match('/The following reason was given:\x0D\x0A\w.{0,255}/', $this->_mdnBody, $matches);
                    
296
                    
                
html.helper.php https://github.com/SeanJA/ShoestringPHP.git | PHP | 214 lines
                    
19	$linkTypes = array('https?:\/\/','mailto:','git:\/\/','git@','ftps?:\/\/');
                    
20	if(!preg_match('/^('.implode('|', $linkTypes).')/', $url)) {
                    
21		$url = $config->base_url.$config->index_file.$url;
                    
125function css($file, array $media=array('all'), $echo) {
                    
126	if(preg_match('/^(https?:\/\//)', $file)) {
                    
127		$str = '<link rel="stylesheet" type="text/css" href="'.h($file, false).'"';
                    
146function js($file) {
                    
147	if(preg_match('/^(https?:\/\//)', $file)) {
                    
148		$str = '<script type="text/javascript" src="'.h($file, false).'" ></script>';
                    
                
class.HP-UX.inc.php https://github.com/vtiger-jp/vtigercrm-5.1.x-ja.git | PHP | 421 lines
                    
71
                    
72    if (preg_match("/average: (.*), (.*), (.*)$/", $buf, $ar_buf)) {
                    
73      $results['avg'] = array($ar_buf[1], $ar_buf[2], $ar_buf[3]);
                    
169
                    
170          if (!preg_match('/bridge/i', $key) && !preg_match('/USB/i', $key)) {
                    
171            $results[] = preg_replace('/\([^\)]+\)\.$/', '', trim($value));
                    
186    foreach( $bufd as $file ) {
                    
187      if (preg_match('/^hd/', $file)) {
                    
188        $results[$file] = array(); 
                    
205            $results[$file]['manufacture'] = 'Western Digital';
                    
206          } elseif (preg_match('/IBM/', $results[$file]['model'])) {
                    
207            $results[$file]['manufacture'] = 'IBM';
                    
239      foreach( $bufe as $buf ) {
                    
240        if (preg_match('/Vendor/', $buf)) {
                    
241          preg_match('/Vendor: (.*) Model: (.*) Rev: (.*)/i', $buf, $dev);
                    
                
civicrm.php https://gitlab.com/virtualrealms/d7civicrm | PHP | 361 lines
                    
112    if (isset($config['seedLanguage'])
                    
113      and preg_match('/^[a-z][a-z]_[A-Z][A-Z]$/', $config['seedLanguage'])
                    
114      and file_exists($sqlPath . DIRECTORY_SEPARATOR . "civicrm_data.{$config['seedLanguage']}.mysql")
                    
                
Test.php https://github.com/digitarald/pullhub.git | PHP | 362 lines
                    
170
                    
171                if (preg_match_all('/@assert(.*)$/Um', $method->getDocComment(), $annotations)) {
                    
172                    foreach ($annotations[1] as $annotation) {
                    
172                    foreach ($annotations[1] as $annotation) {
                    
173                        if (preg_match('/\((.*)\)\s+([^\s]*)\s+(.*)/', $annotation, $matches)) {
                    
174                            switch ($matches[2]) {
                    
                
Minify.php https://gitlab.com/gregtyka/lfmawordpress | PHP | 382 lines
                    
234                $match = null;
                    
235                if (preg_match($pattern, $content, $match)) {
                    
236                    $matches[$i] = $match;
                    
238                    // we'll store the match position as well; that way, we
                    
239                    // don't have to redo all preg_matches after changing only
                    
240                    // the first (we'll still know where those others are)
                    
                
debug.php https://bitbucket.org/GeCk0/ilchshop.git | PHP | 202 lines
                    
87        if (!empty($q)) {
                    
88          if (preg_match('/(SELECT){1}/i',$q,$match)) {
                    
89            $new_query = link_querys($q, $key);
                    
105    {
                    
106      if ((preg_match('/(javascript:)(FUNCTION)(;)/i',$href, $match) AND !is_NULL($function)) OR preg_match('/(javascript:)(FUNCTION)(;)/i',$href, $match)) {
                    
107        $href = $match[1] . 'alert(' . $key . ')' . $match[3];
                    
                
preg_match.js https://gitlab.com/orvi2014/phpjs | JavaScript | 208 lines
                    
1function preg_match(pattern, subject, matches, flags, offset) {
                    
2  // http://kevin.vanzonneveld.net
                    
5  // *     example 1: matches = [];
                    
6  // *     example 1: preg_match(/(\w+)\W([\W\w]+)/, 'this is some text', matches);
                    
7  // *     matches 1: matches[1] == 'this'
                    
12  // Before finding this, I was working on a script to search through an SQLite database to build our Unicode expressions automatically; I may finish that as it should be expandable for the future, and be an extra eye to confirm Steve's work
                    
13  // Also need to look at/integrate with Michael Grier's http://mgrier.com/te5t/preg_match_all.js ; http://mgrier.com/te5t/testpma.html ; http://mgrier.com/te5t/testpma.php
                    
14
                    
44        switch (flag) {
                    
45          case 'g': // We don't use this in preg_match, but it's presumably not an error
                    
46          case 'm':
                    
                
utf8_functions.php https://gitlab.com/truongdacngoc1993/tuanviet.git | PHP | 303 lines
                    
137
                    
138	preg_match_all( '/.{' . $split_len . '}|[^\x00]{1,' . $split_len . '}$/us', $str, $ar );
                    
139	return $ar[0];
                    
157
                    
158	preg_match( '/^[' . $mask . ']+/u', $str, $matches );
                    
159
                    
186		default:
                    
187			preg_match( '/^(.{1})(.*)$/us', $str, $matches );
                    
188			return nv_strtoupper( $matches[1] ) . $matches[2];
                    
                
 

Source

Language