PageRenderTime 274ms queryTime 51ms sortTime 5ms getByIdsTime 46ms findMatchingLines 79ms

100+ results results for 'php preg_match_all repo:vincentamari/SuperSweetAdmin' (274 ms)

Not the results you expected?
AnalyzerClassFileSystemLocator.php https://github.com/Proudio-Interactive/pdepend.git | PHP | 196 lines
                    
39 * @category   QualityAssurance
                    
40 * @package    PHP_Depend
                    
41 * @subpackage Metrics
                    
43 * @copyright  2008-2011 Manuel Pichler. All rights reserved.
                    
44 * @license    http://www.opensource.org/licenses/bsd-license.php  BSD License
                    
45 * @version    SVN: $Id$
                    
50/**
                    
51 * Locator that searches for PHP_Depend analyzers that follow the PHP_Depend
                    
52 * convention and are present the PHP_Depend source tree.
                    
54 * @category   QualityAssurance
                    
55 * @package    PHP_Depend
                    
56 * @subpackage Metrics
                    
58 * @copyright  2008-2011 Manuel Pichler. All rights reserved.
                    
59 * @license    http://www.opensource.org/licenses/bsd-license.php  BSD License
                    
60 * @version    Release: @package_version@
                    
                
api.php https://github.com/castlino/linonico.com.git | PHP | 216 lines
                    
7 *
                    
8 * PHP versions 4 and 5
                    
9 *
                    
9 *
                    
10 * CakePHP(tm) :  Rapid Development Framework (http://www.cakephp.org)
                    
11 * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
                    
17 * @copyright     Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
                    
18 * @link          http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project
                    
19 * @package       cake
                    
97
                    
98		$parsed = $this->__parseClass($path . $file .'.php');
                    
99
                    
155						"\t\tAvailable values:\n\n".
                    
156						"\t\tbehavior\tLook for class in CakePHP behavior path\n".
                    
157						"\t\tcache\tLook for class in CakePHP cache path\n".
                    
                
qubaid_condition_test.php https://github.com/pauln/moodle.git | PHP | 161 lines
                    
1<?php
                    
2// This file is part of Moodle - http://moodle.org/
                    
17/**
                    
18 * This file contains tests for some of the code in ../datalib.php.
                    
19 *
                    
29global $CFG;
                    
30require_once(dirname(__FILE__) . '/../lib.php');
                    
31
                    
42        $newparams = array();
                    
43        preg_match_all('/(?<!:):([a-z][a-z0-9_]*)/', $sql, $named_matches);
                    
44        foreach($named_matches[1] as $param) {
                    
                
QueryBuilder.php https://gitlab.com/haroldv22/tupadrino | PHP | 184 lines
                    
1<?php
                    
2/**
                    
174        $sql = str_replace(', [', ",\n[", $sql);
                    
175        if (preg_match_all('/^\s*\[(.*?)\]\s+(.*?),?$/m', $sql, $matches)) {
                    
176            foreach ($matches[1] as $i => $c) {
                    
                
Batch.php https://bitbucket.org/areeves42/openfisma.git | PHP | 248 lines
                    
1<?php
                    
2/**
                    
25 */
                    
26// require_once 'Zend/Service/WindowsAzure/Exception.php';
                    
27
                    
30 */
                    
31// require_once 'Zend/Service/WindowsAzure/Storage/BatchStorageAbstract.php';
                    
32
                    
208        $errors = null;
                    
209        preg_match_all('/<message (.*)>(.*)<\/message>/', $response->getBody(), $errors);
                    
210
                    
                
websocket.class.php https://github.com/aabhasgarg/ariel.git | PHP | 162 lines
                    
1<?php  
                    
2
                    
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);
                    
                
datalib_test.php https://github.com/mayankgupta/moodle.git | PHP | 161 lines
                    
1<?php
                    
2// This file is part of Moodle - http://moodle.org/
                    
17/**
                    
18 * This file contains tests for some of the code in ../datalib.php.
                    
19 *
                    
29global $CFG;
                    
30require_once(dirname(__FILE__) . '/../lib.php');
                    
31
                    
33/**
                    
34 * Unit tests for some of the code in ../datalib.php.
                    
35 *
                    
42        $newparams = array();
                    
43        preg_match_all('/(?<!:):([a-z][a-z0-9_]*)/', $sql, $named_matches);
                    
44        foreach($named_matches[1] as $param) {
                    
                
Typography.php https://bitbucket.org/mbaily/tremain.git | PHP | 410 lines
                    
1<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
                    
2/**
                    
4 *
                    
5 * An open source application development framework for PHP 5.2.4 or newer
                    
6 *
                    
86		{
                    
87			if (preg_match_all("#(<!\-\-.*?\-\->)#s", $str, $matches))
                    
88			{
                    
196						// we will retain them instead of using our tags.
                    
197						'/(<p[^>*?]>)<p>/'	=> '$1', // <?php BBEdit syntax coloring bug fix
                    
198
                    
408
                    
409/* End of file Typography.php */
                    
410/* Location: ./system/libraries/Typography.php */
                    
                
SF_TemplateInForm.php https://github.com/ChuguluGames/mediawiki-svn.git | PHP | 204 lines
                    
1<?php
                    
2/**
                    
53			// that map a property onto a list.
                    
54			if ( $ret = preg_match_all( '/{{#arraymap:{{{([^|}]*:?[^|}]*)[^\[]*\[\[([^:]*:?[^:]*)::/mis', $templateText, $matches ) ) {
                    
55				foreach ( $matches[1] as $i => $field_name ) {
                    
62			} elseif ( $ret === false ) {
                    
63				// There was an error in the preg_match_all()
                    
64				// call - let the user know about it.
                    
65				if ( preg_last_error() == PREG_BACKTRACK_LIMIT_ERROR ) {
                    
66					print 'Semantic Forms error: backtrace limit exceeded during parsing! Please increase the value of <a href="http://www.php.net/manual/en/pcre.configuration.php#ini.pcre.backtrack-limit">pcre.backtrack-limit</a> in the PHP settings.';
                    
67				}
                    
70			// Second, look for normal property calls.
                    
71			if ( preg_match_all( '/\[\[([^:|\[\]]*:*?[^:|\[\]]*)::{{{([^\]\|}]*).*?\]\]/mis', $templateText, $matches ) ) {
                    
72				foreach ( $matches[1] as $i => $propertyName ) {
                    
83			// (thankfully, they have basically the same syntax).
                    
84			if ( preg_match_all( '/#(set|set_internal):(.*?}}})\s*}}/mis', $templateText, $matches ) ) {
                    
85				foreach ( $matches[2] as $i => $match ) {
                    
                
StringParser.php git://github.com/egeniq/adapto.git | PHP | 213 lines
                    
1<?php
                    
2/**
                    
154        $matches = array();
                    
155        preg_match_all("/\[[^\]]*\]|[^[]+/", $this->m_string, $matches);
                    
156        return $matches;
                    
                
pipelines_publiHALRSS.php https://bitbucket.org/pombredanne/spip-zone-treemap.git | PHP | 210 lines
                    
1<?php
                    
2/**
                    
13	
                    
14	// copie des lignes 128 à 142 de syndic.php
                    
15	// Echapper les CDATA
                    
16	$echappe_cdata = array();
                    
17	if (preg_match_all(',<!\[CDATA\[(.*)]]>,Uims', $rss,
                    
18	$regs, PREG_SET_ORDER)) {
                    
42	$rss = preg_replace_callback(
                    
43			',<(item|entry)([:[:space:]][^>]*)?>(.*)</\1>,Uims',// copie de la ligne 165 de syndic.php
                    
44			"publiHAL_supprime_si_deja_la",
                    
67	//spip_log("passage 2 !!!!!!");
                    
68	// voir inc/syndic.php
                    
69	list($le_lien, $id_syndic, $data) = func_get_arg(0);
                    
83
                    
84	if(preg_match_all(',<(publisher|typedoc|coverage)>(.*)</\1>,Uims',$data['item'],$matches,PREG_SET_ORDER)){
                    
85		foreach ($matches as $match) {
                    
                
preg_match.js https://gitlab.com/orvi2014/phpjs | JavaScript | 208 lines
                    
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
                    
39      flagPart = pattern.slice(lastDelimPos + 1);
                    
40      // Fix: Need to study http://php.net/manual/en/regexp.reference.php more thoroughly
                    
41      // e.g., internal options i, m, s, x, U, X, J; conditional subpatterns?, comments, recursive subpatterns,
                    
49            break;
                    
50          case 'e': // used in preg_replace only but ignored elsewhere; "does normal substitution of backreferences in the replacement string, evaluates it as PHP code, and uses the result for replacing the search string". "Single quotes, double quotes, backslashes and NULL chars will be escaped by backslashes in substituted backreferences."
                    
51            // Safely ignorable
                    
60            throw 'The passed flag "' + flag + '" is presently unsupported in ' + getFuncName(arguments.callee);
                    
61          case 'X': // "additional functionality of PCRE that is incompatible with Perl. Any backslash in a pattern that is followed by a letter that has no special meaning causes an error, thus reserving these combinations for future expansion"; not in use in PHP presently
                    
62            throw 'X flag is unimplemented at present';
                    
67              // x[a-fA-F\d][a-fA-F\d] (hex)
                    
68              // "Back references to the named subpatterns can be achieved by (?P=name) or, since PHP 5.2.4, also by \k<name>, \k'name', \k{name} or \g{name}"
                    
69              // Unicode classes (with u flag only)
                    
                
adodb-mssql_n.inc.php https://github.com/mackensen/moodle.git | PHP | 226 lines
                    
1<?php
                    
2/**
                    
8 *
                    
9 * This file is part of ADOdb, a Database Abstraction Layer library for PHP.
                    
10 *
                    
31
                    
32include_once(ADODB_DIR.'/drivers/adodb-mssql.inc.php');
                    
33
                    
129            $regexp = '/(' . SINGLEQUOTE . SINGLEQUOTE . ')/';
                    
130            preg_match_all($regexp, $inboundValue, $list_of_pairs);
                    
131
                    
147            $regexp = '/(N?' . SINGLEQUOTE . '.*?' . SINGLEQUOTE . ')/is';
                    
148            preg_match_all($regexp, $inboundValue, $list_of_literals);
                    
149
                    
                
ElementLiteral.php https://gitlab.com/src-run/jabiru | PHP | 310 lines
                    
1<?php
                    
2
                    
258        // @codeCoverageIgnoreStart
                    
259        return preg_match_all("/[\\\\x00-\\\\xBF]|[\\\\xC0-\\\\xFF][\\\\x80-\\\\xBF]*/", $this->text);
                    
260        // @codeCoverageIgnoreEnd
                    
                
generate_utf_tables.php https://bitbucket.org/enitarzi/phpbb3-gorgon.git | PHP | 571 lines
                    
35
                    
36require_once($phpbb_root_path . 'includes/utf/utf_normalizer.' . $phpEx);
                    
37$file_contents = array();
                    
173echo "Loading Unicode decomposition mappings\n";
                    
174$fp = fopen($phpbb_root_path . 'develop/UnicodeData.txt', 'rt');
                    
175
                    
267	*/
                    
268	echo "Writing to $file.$phpEx\n";
                    
269
                    
269
                    
270	if (!$fp = fopen($phpbb_root_path . 'includes/utf/data/' . $file . '.' . $phpEx, 'wb'))
                    
271	{
                    
408	echo "Writing to search_indexer_$idx.$phpEx\n";
                    
409	$fp = fopen($phpbb_root_path . 'includes/utf/data/search_indexer_' . $idx . '.' . $phpEx, 'wb');
                    
410	fwrite($fp, '<?php return ' . my_var_export($contents) . ';');
                    
                
em-events.php https://gitlab.com/Blueprint-Marketing/interoccupy.net | PHP | 274 lines
                    
1<?php
                    
2/*
                    
33					$args = EM_Events::get_post_search( array_merge($args, $_REQUEST) );
                    
34					em_locate_template('templates/calendar-day.php',true, array('args'=>$args));
                    
35				}elseif ( $wp_query->get('bookings_page') && empty($my_bookings_page_id)) {
                    
36					//Bookings Page
                    
37					em_locate_template('templates/my-bookings.php',true);
                    
38				}elseif ( is_object($EM_Event)) {
                    
38				}elseif ( is_object($EM_Event)) {
                    
39					em_locate_template('templates/event-single.php',true, array('args'=>$args));	
                    
40				}else{
                    
45						$args['long_events'] = 1;
                    
46						em_locate_template('templates/events-calendar.php',true, array('args'=>$args));
                    
47					}else{
                    
52						}
                    
53						em_locate_template('templates/events-list.php', true, array('args'=>$args));
                    
54					}
                    
                
Common2.php https://github.com/quarkness/piwik.git | PHP | 488 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3 * HTML_Common2: port of HTML_Common package to PHP5
                    
4 *
                    
4 *
                    
5 * PHP version 5
                    
6 *
                    
8 *
                    
9 * Copyright (c) 2004-2009, Alexey Borzov <avb@php.net>
                    
10 *
                    
38 * @package    HTML_Common2
                    
39 * @author     Alexey Borzov <avb@php.net>
                    
40 * @license    http://opensource.org/licenses/bsd-license.php New BSD License
                    
40 * @license    http://opensource.org/licenses/bsd-license.php New BSD License
                    
41 * @version    CVS: $Id: Common2.php 295050 2010-02-14 05:01:19Z clockwerx $
                    
42 * @link       http://pear.php.net/package/HTML_Common2
                    
                
RawSql.php https://bitbucket.org/pastor399/newcastleunifc.git | PHP | 454 lines
                    
1<?php
                    
2/*
                    
2/*
                    
3 *  $Id: RawSql.php 48519 2012-02-03 23:18:52Z btowles $
                    
4 *
                    
32 * @subpackage  RawSql
                    
33 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL
                    
34 * @link        www.doctrine-project.org
                    
114    {
                    
115        preg_match_all('/{([^}{]*)}/U', $queryPart, $m);
                    
116        $this->fields = $m[1];
                    
                
htmlawed.php https://bitbucket.org/pastor399/newcastleunifc.git | PHP | 709 lines
                    
1<?php
                    
2
                    
6LGPL v3 license
                    
7A PHP Labware internal utility; www.bioinformatics.org/phplabware/internal_utilities/htmLawed
                    
8
                    
28 if(isset($x[1])){
                    
29  preg_match_all('`(?:^|-|\+)[^\-+]+?(?=-|\+|$)`', $x, $m, PREG_SET_ORDER);
                    
30  for($i=count($m); --$i>=0;){$m[$i] = $m[$i][0];}
                    
                
videos.php https://bitbucket.org/pastor399/newcastleunifc.git | PHP | 603 lines
                    
1<?php
                    
2/**
                    
4 * @copyright	Copyright (C) 2010 Stack Ideas Private Limited. All rights reserved.
                    
5 * @license		GNU/GPL, see LICENSE.php
                    
6 *
                    
10 * other free or open source software licenses.
                    
11 * See COPYRIGHT.php for copyright notices and details.
                    
12 */
                    
15
                    
16require_once( EBLOG_HELPERS . DIRECTORY_SEPARATOR . 'helper.php' );
                    
17
                    
63		$pattern	= '/\[embed=(.*)\](.*)\[\/embed\]/i';
                    
64		preg_match_all( $pattern , $content , $matches , PREG_SET_ORDER );
                    
65
                    
103		{
                    
104			require_once( EBLOG_CLASSES . DIRECTORY_SEPARATOR . 'json.php' );
                    
105
                    
                
shortanswer.php https://bitbucket.org/kudutest1/moodlegit.git | PHP | 372 lines
                    
1<?php
                    
2
                    
52        global $USER, $CFG, $PAGE;
                    
53        $mform = new lesson_display_answer_form_shortanswer($CFG->wwwroot.'/mod/lesson/continue.php', array('contents'=>$this->get_contents(), 'lessonid'=>$this->lesson->id));
                    
54        $data = new stdClass;
                    
66
                    
67        $mform = new lesson_display_answer_form_shortanswer($CFG->wwwroot.'/mod/lesson/continue.php', array('contents'=>$this->get_contents()));
                    
68        $data = $mform->get_data();
                    
131                            //check for one or several matches
                    
132                            if (preg_match_all('/'.$expectedanswer.'/'.$ignorecase,$studentanswer, $matches)) {
                    
133                                $ismatch   = true;
                    
                
tcpdf_parser.php https://bitbucket.org/kudutest1/moodlegit.git | PHP | 510 lines
                    
1<?php
                    
2//============================================================+
                    
2//============================================================+
                    
3// File name   : tcpdf_parser.php
                    
4// Version     : 1.0.001
                    
30//
                    
31// Description : This is a PHP class for parsing PDF documents.
                    
32//
                    
36 * @file
                    
37 * This is a PHP class for parsing PDF documents.<br>
                    
38 * @package com.tecnick.tcpdf
                    
43// include class for decoding filters
                    
44require_once(dirname(__FILE__).'/tcpdf_filters.php');
                    
45
                    
47 * @class TCPDF_PARSER
                    
48 * This is a PHP class for parsing PDF documents.<br>
                    
49 * @package com.tecnick.tcpdf
                    
                
Misc.php https://bitbucket.org/kudutest1/moodlegit.git | PHP | 2173 lines
                    
1<?php
                    
2/**
                    
4 *
                    
5 * A PHP-Based RSS and Atom Feed Framework.
                    
6 * Takes the hard work out of managing a complete RSS/Atom solution.
                    
41 * @link http://simplepie.org/ SimplePie
                    
42 * @license http://www.opensource.org/licenses/bsd-license.php BSD License
                    
43 */
                    
101		$name = preg_quote($realname, '/');
                    
102		if (preg_match_all("/<($name)" . SIMPLEPIE_PCRE_HTML_ATTRIBUTE . "(>(.*)<\/$name>|(\/)?>)/siU", $string, $matches, PREG_SET_ORDER | PREG_OFFSET_CAPTURE))
                    
103		{
                    
118				$return[$i]['attribs'] = array();
                    
119				if (isset($matches[$i][2][0]) && preg_match_all('/[\x09\x0A\x0B\x0C\x0D\x20]+([^\x09\x0A\x0B\x0C\x0D\x20\x2F\x3E][^\x09\x0A\x0B\x0C\x0D\x20\x2F\x3D\x3E]*)(?:[\x09\x0A\x0B\x0C\x0D\x20]*=[\x09\x0A\x0B\x0C\x0D\x20]*(?:"([^"]*)"|\'([^\']*)\'|([^\x09\x0A\x0B\x0C\x0D\x20\x22\x27\x3E][^\x09\x0A\x0B\x0C\x0D\x20\x3E]*)?))?/', ' ' . $matches[$i][2][0] . ' ', $attribs, PREG_SET_ORDER))
                    
120				{
                    
379	 *
                    
380	 * To generate it, run `php create.php` on the command line, and copy the
                    
381	 * output to replace this function.
                    
                
XMLStream.php https://bitbucket.org/kudutest1/moodlegit.git | PHP | 763 lines
                    
2/**
                    
3 * XMPPHP: The PHP XMPP Library
                    
4 * Copyright (C) 2008  Nathanael C. Fritz
                    
11 * 
                    
12 * XMPPHP is distributed in the hope that it will be useful,
                    
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
                    
17 * You should have received a copy of the GNU General Public License
                    
18 * along with XMPPHP; if not, write to the Free Software
                    
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
                    
48 */
                    
49class XMPPHP_XMLStream {
                    
50	/**
                    
565							if($handler[2] === null) $handler[2] = $this;
                    
566							$this->log->log("Calling {$handler[1]}",  XMPPHP_Log::LEVEL_DEBUG);
                    
567							$handler[2]->$handler[1]($this->xmlobj[2]);
                    
                
comment.php https://bitbucket.org/jstroschein/wordpress-3.5.1-clean.git | PHP | 1482 lines
                    
1<?php
                    
2/**
                    
50	if ( $max_links = get_option( 'comment_max_links' ) ) {
                    
51		$num_links = preg_match_all( '/<a [^>]*href/i', $comment, $out );
                    
52		$num_links = apply_filters( 'comment_max_links_url', $num_links, $url ); // provide for counting of $url as a link
                    
                
videopress.php https://github.com/sharpmachine/wakeupmedia.com.git | PHP | 1333 lines
                    
1<?php
                    
2/**
                    
31	/**
                    
32	 * Plugin version in PHP-addressable form
                    
33	 * @var string
                    
64		/**
                    
65		 * json_decode should be initialized by compat.php. It's a PHP extension that might not be turned on, or could not be compatible with older version of PHP. We won't be able to unpack the server response without it, so let's fail early.
                    
66		 */
                    
81	/**
                    
82	 * PHP 4 constructor compatibility
                    
83	 *
                    
84	 * @since 1.5
                    
85	 * @todo remove when targeting PHP 5 (WordPress 3.2 requirement) or above.
                    
86	 */
                    
113	public static function find_all_shortcodes( $content ) {
                    
114		$r = preg_match_all( '/(.?)\[(wpvideo|videopress)\b(.*?)(?:(\/))?\](?:(.+?)\[\/\2\])?(.?)/s', $content, $matches, PREG_SET_ORDER );
                    
115
                    
                
init.php https://github.com/yoniweb/forkcms-Golden-Gate.git | PHP | 497 lines
                    
1<?php
                    
2
                    
48
                    
49		// set a default timezone if no one was set by PHP.ini
                    
50		if(ini_get('date.timezone') == '') date_default_timezone_set('Europe/Brussels');
                    
73		// require spoon
                    
74		require_once 'spoon/spoon.php';
                    
75
                    
101		// exceptions
                    
102		$exceptions['backend'] = BACKEND_CORE_PATH . '/engine/backend.php';
                    
103		$exceptions['backendajaxaction'] = BACKEND_CORE_PATH . '/engine/ajax_action.php';
                    
103		$exceptions['backendajaxaction'] = BACKEND_CORE_PATH . '/engine/ajax_action.php';
                    
104		$exceptions['backendbaseajaxaction'] = BACKEND_CORE_PATH . '/engine/base.php';
                    
105		$exceptions['backenddatagriddb'] = BACKEND_CORE_PATH . '/engine/datagrid.php';
                    
105		$exceptions['backenddatagriddb'] = BACKEND_CORE_PATH . '/engine/datagrid.php';
                    
106		$exceptions['backenddatagridarray'] = BACKEND_CORE_PATH . '/engine/datagrid.php';
                    
107		$exceptions['backendbaseconfig'] = BACKEND_CORE_PATH . '/engine/base.php';
                    
                
VideoController.php https://gitlab.com/macitsimsek/fastsubtitle | PHP | 644 lines
                    
1<?php
                    
2
                    
28        $parcala	=	('@<tr class="(.*?)"> <td class="primary_photo"> <a href="(.*?)" ><img src="(.*?)" /></a> </td> <td class="result_text"> <a href="(.*?)" >(.*?)</a>(.*?)</td> </tr>@');
                    
29        preg_match_all($parcala,$page,$cikti);
                    
30        $sonucdizi	=	$cikti[5];
                    
131        return $name['data']['cast'];
                    
132        return \GuzzleHttp\json_decode(file_get_contents('https://tr.wikipedia.org/w/api.php?format=json&action=query&prop=extracts&exintro=&explaintext=&formatversion=2&titles='.$name),true)['query']['pages'][0]['extract'];
                    
133    }
                    
137        $input      =   str_replace(' ','+',$input);
                    
138        $name       =   \GuzzleHttp\json_decode(file_get_contents('https://en.wikipedia.org/w/api.php?action=query&list=search&utf8=&formatversion=2&format=json&srsearch='.$input),true);
                    
139        foreach ($name['query']['search'] as $perName){
                    
141            if($name==$input){
                    
142                $content    =   \GuzzleHttp\json_decode(file_get_contents('https://en.wikipedia.org/w/api.php?format=json&action=query&prop=extracts&exintro=&explaintext=&formatversion=2&titles='.$name),true)['query']['pages'][0]['extract'];
                    
143                $tr     =   new TranslateClient('en','tr');
                    
147        }
                    
148        $name       =   \GuzzleHttp\json_decode(file_get_contents('https://tr.wikipedia.org/w/api.php?action=query&list=search&utf8=&formatversion=2&format=json&srsearch='.$input),true);
                    
149        foreach ($name['query']['search'] as $perName){
                    
                
comment.php https://gitlab.com/endomorphosis/reservationtelco | PHP | 1484 lines
                    
1<?php
                    
2/**
                    
49	if ( $max_links = get_option( 'comment_max_links' ) ) {
                    
50		$num_links = preg_match_all( '/<a [^>]*href/i', apply_filters( 'comment_text', $comment ), $out );
                    
51		$num_links = apply_filters( 'comment_max_links_url', $num_links, $url ); // provide for counting of $url as a link
                    
                
Test.php https://gitlab.com/ealexis.t/trends | PHP | 1084 lines
                    
49        if ($asString) {
                    
50            if ($test instanceof PHPUnit_Framework_SelfDescribing) {
                    
51                return $test->toString();
                    
200
                    
201        // https://bugs.php.net/bug.php?id=63055
                    
202        $matches = array();
                    
231
                    
232        if (!empty($required['PHP']) && version_compare(PHP_VERSION, $required['PHP'], '<')) {
                    
233            $missing[] = sprintf('PHP %s (or later) is required.', $required['PHP']);
                    
236        if (!empty($required['PHPUnit'])) {
                    
237            $phpunitVersion = PHPUnit_Runner_Version::id();
                    
238            if (version_compare($phpunitVersion, $required['PHPUnit'], '<')) {
                    
238            if (version_compare($phpunitVersion, $required['PHPUnit'], '<')) {
                    
239                $missing[] = sprintf('PHPUnit %s (or later) is required.', $required['PHPUnit']);
                    
240            }
                    
                
Route.php https://gitlab.com/ealexis.t/trends | PHP | 945 lines
                    
1<?php
                    
2
                    
223    {
                    
224        preg_match_all('/\{(\w+?)\?\}/', $this->uri, $matches);
                    
225
                    
417    {
                    
418        preg_match_all('/\{(.*?)\}/', $this->domain().$this->uri, $matches);
                    
419
                    
                
functions.php https://gitlab.com/ealexis.t/trends | PHP | 812 lines
                    
1<?php
                    
2namespace GuzzleHttp\Psr7;
                    
79    if (is_scalar($resource)) {
                    
80        $stream = fopen('php://temp', 'r+');
                    
81        if ($resource !== '') {
                    
107        case 'NULL':
                    
108            return new Stream(fopen('php://temp', 'r+'), $options);
                    
109    }
                    
135        foreach (preg_split('/;(?=([^"]*"[^"]*")*[^"]*$)/', $val) as $kvp) {
                    
136            if (preg_match_all('/<[^>]+>|[^=]+/', $kvp, $matches)) {
                    
137                $m = $matches[0];
                    
269/**
                    
270 * Safely opens a PHP stream resource using a filename.
                    
271 *
                    
271 *
                    
272 * When fopen fails, PHP normally raises a warning. This function adds an
                    
273 * error handler that checks for errors and throws an exception instead.
                    
                
Form_validation.php https://gitlab.com/lisit1003/TTPHPServer | PHP | 1382 lines
                    
1<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
                    
2/**
                    
4 *
                    
5 * An open source application development framework for PHP 5.1.6 or newer
                    
6 *
                    
114		// into its components so that we can fetch the corresponding POST data later
                    
115		if (strpos($field, '[') !== FALSE AND preg_match_all('/\[(.*?)\]/', $field, $matches))
                    
116		{
                    
117			// Note: Due to a bug in current() that affects some versions
                    
118			// of PHP we can not pass function call directly into it
                    
119			$x = explode('[', $field);
                    
614				{
                    
615					// If our own wrapper function doesn't exist we see if a native PHP function does.
                    
616					// Users can use any native PHP function call that has one param.
                    
                
shortcodes.php https://gitlab.com/VTTE/sitios-vtte | PHP | 671 lines
                    
1<?php
                    
2/**
                    
145	if ( shortcode_exists( $tag ) ) {
                    
146		preg_match_all( '/' . get_shortcode_regex() . '/', $content, $matches, PREG_SET_ORDER );
                    
147		if ( empty( $matches ) ) {
                    
207	// Find all registered tag names in $content.
                    
208	preg_match_all( '@\[([^<>&/\[\]\x00-\x20=]++)@', $content, $matches );
                    
209	$tagnames = array_intersect( array_keys( $shortcode_tags ), $matches[1] );
                    
259
                    
260	// phpcs:disable Squiz.Strings.ConcatenationSpacing.PaddingFound -- don't remove regex indentation
                    
261	return '\\['                             // Opening bracket.
                    
288		. '(\\]?)';                          // 6: Optional second closing brocket for escaping shortcodes: [[tag]].
                    
289	// phpcs:enable
                    
290}
                    
                
comment.php https://gitlab.com/VTTE/sitios-vtte | PHP | 1531 lines
                    
1<?php
                    
2/**
                    
46
                    
47	/** This filter is documented in wp-includes/comment-template.php */
                    
48	$comment = apply_filters( 'comment_text', $comment, null, array() );
                    
52	if ( $max_links ) {
                    
53		$num_links = preg_match_all( '/<a [^>]*href/i', $comment, $out );
                    
54
                    
                
class-wp-text-diff-renderer-table.php https://gitlab.com/VTTE/sitios-vtte | PHP | 551 lines
                    
1<?php
                    
2/**
                    
199
                    
200				/** This filter is documented in wp-includes/wp-diff.php */
                    
201				$line = apply_filters( 'process_text_diff_html', $processed_line, $line, 'deleted' );
                    
224
                    
225				/** This filter is documented in wp-includes/wp-diff.php */
                    
226				$line = apply_filters( 'process_text_diff_html', $processed_line, $line, 'unchanged' );
                    
274				// If they're too different, don't include any <ins> or <del>'s.
                    
275				if ( preg_match_all( '!(<ins>.*?</ins>|<del>.*?</del>)!', $diff, $diff_matches ) ) {
                    
276					// Length of all text between <ins> or <del>.
                    
                
intialise_conversation.php https://gitlab.com/tutaalexandr/bot_local | PHP | 690 lines
                    
1<?php
                    
2
                    
6  * Version: 2.4.8
                    
7  * FILE: chatbot/core/conversation/intialise_conversation.php
                    
8  * AUTHOR: Elizabeth Perreau and Dave Morton
                    
221    {
                    
222      $matches = preg_match_all("# ?(([^\.\?!]*)+(?:[\.\?!]|(?:<br ?/?>))*)#ui", $value, $sentences);
                    
223      $cmatch = 0;
                    
                
find_aiml.php https://gitlab.com/tutaalexandr/bot_local | PHP | 1036 lines
                    
1<?php
                    
2  /***************************************
                    
5    * Version: 2.4.8
                    
6    * FILE: find_aiml.php
                    
7    * AUTHOR: Elizabeth Perreau and Dave Morton
                    
206      $aiml_thatpattern_wildcards = (!empty($aiml_thatpattern)) ? build_wildcard_RegEx($aiml_thatpattern) : '';
                    
207      $aiml_thatpattern_wc_matches = (!empty($aiml_thatpattern_wildcards)) ? preg_match_all($aiml_thatpattern_wildcards,$current_thatpattern) : 0;
                    
208
                    
282   * Takes a sentence and converts AIML wildcards to Regular Expression wildcards
                    
283   * so that it can be matched in php using pcre search functions
                    
284   *
                    
                
Type.php https://gitlab.com/staging06/myproject | PHP | 475 lines
                    
1<?php
                    
2/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
                    
6 *
                    
7 * PHP versions 5
                    
8 *
                    
8 *
                    
9 * LICENSE: This source file is subject to version 3.0 of the PHP license
                    
10 * that is available through the world-wide-web at the following URI:
                    
10 * that is available through the world-wide-web at the following URI:
                    
11 * http://www.php.net/license/3_0.txt.  If you did not receive a copy of
                    
12 * the PHP License and are unable to obtain it through the web, please
                    
12 * the PHP License and are unable to obtain it through the web, please
                    
13 * send a note to license@php.net so we can mail you a copy immediately.
                    
14 *
                    
19 * @license    http://www.gnu.org/copyleft/lesser.html  GNU LGPL 2.1
                    
20 * @version    CVS: $Id: Type.php 6844 2011-06-03 14:46:51Z dMetzger $
                    
21 * @link       http://pear.php.net/package/XML_Feed_Parser/
                    
                
roots-cleanup.php https://gitlab.com/blueprintmrk/bladencountyrecords | PHP | 515 lines
                    
1<?php
                    
2
                    
58  $output = roots_root_relative_url($input);
                    
59  preg_match_all('!([^/]+)/([^/]+)!', $output, $matches);
                    
60  if (isset($matches[1]) && isset($matches[2])) {
                    
68$roots_options = roots_get_theme_options();
                    
69if (!is_admin() && !in_array($GLOBALS['pagenow'], array('wp-login.php', 'wp-register.php')) && $roots_options['root_relative_urls']) {
                    
70  add_filter('bloginfo_url', 'roots_root_relative_url');
                    
183
                    
184  // stop Gravity Forms from outputting CSS since it's linked in header.php
                    
185  if (class_exists('RGForms')) {
                    
190  // why you might want to keep it: http://wordpress.stackexchange.com/questions/5451/what-does-l10n-js-do-in-wordpress-3-1-and-how-do-i-remove-it/5484#5484
                    
191  // don't load jQuery through WordPress since it's linked in header.php
                    
192  if (!is_admin()) {
                    
                
class.add-from-server.php https://gitlab.com/blueprintmrk/bladencountyrecords | PHP | 678 lines
                    
1<?php
                    
2class add_from_server {
                    
69		if ( $this->user_allowed() )
                    
70			$links[] = '<a href="' . admin_url('upload.php?page=add-from-server') . '">' . __('Import Files', 'add-from-server') . '</a>';
                    
71		if ( current_user_can('manage_options') )
                    
71		if ( current_user_can('manage_options') )
                    
72			$links[] = '<a href="' . admin_url('options-general.php?page=add-from-server-settings') . '">' . __('Options', 'add-from-server') . '</a>';
                    
73
                    
135
                    
136		include 'class.add-from-server-settings.php';
                    
137		$this->settings = new add_from_server_settings(&$this);
                    
207			// Ensure only valid placeholders are used:
                    
208			if ( preg_match_all('!%(.*?)%!', $o, $placeholders) ) {
                    
209				$valid_ph = array('username', 'role');
                    
405
                    
406		if ( 'upload.php' == $pagenow )
                    
407			$url = admin_url('upload.php?page=add-from-server');
                    
                
Runner.php https://gitlab.com/Blueprint-Marketing/wp-cli | PHP | 708 lines
                    
112
                    
113		if ( !preg_match( '|^\s*require\s*\(?\s*(.+?)/wp-blog-header\.php([\'"])|m', $index_code, $matches ) ) {
                    
114			return false;
                    
149		while ( is_readable( $dir ) ) {
                    
150			if ( file_exists( "$dir/wp-load.php" ) ) {
                    
151				return $dir;
                    
154			if ( file_exists( "$dir/index.php" ) ) {
                    
155				if ( $path = self::extract_subdir_path( "$dir/index.php" ) )
                    
156					return $path;
                    
324	/**
                    
325	 * Returns wp-config.php code, skipping the loading of wp-settings.php
                    
326	 *
                    
347		if ( !$found_wp_settings ) {
                    
348			WP_CLI::error( 'Strange wp-config.php file: wp-settings.php is not loaded directly.' );
                    
349		}
                    
                
comment.php https://gitlab.com/Blueprint-Marketing/WordPress-1 | PHP | 1591 lines
                    
1<?php
                    
2/**
                    
46
                    
47	/** This filter is documented in wp-includes/comment-template.php */
                    
48	$comment = apply_filters( 'comment_text', $comment );
                    
51	if ( $max_links = get_option( 'comment_max_links' ) ) {
                    
52		$num_links = preg_match_all( '/<a [^>]*href/i', $comment, $out );
                    
53		/**
                    
                
qtranslate_core.php https://gitlab.com/Blueprint-Marketing/interoccupy.net | PHP | 826 lines
                    
1<?php // encoding: utf-8
                    
2
                    
91		$prefered_languages = array();
                    
92		if(isset($_SERVER["HTTP_ACCEPT_LANGUAGE"]) && preg_match_all("#([^;,]+)(;[^,0-9]*([0-9\.]+)[^,]*)?#i",$_SERVER["HTTP_ACCEPT_LANGUAGE"], $matches, PREG_SET_ORDER)) {
                    
93			$priority = 1.0;
                    
122	global $wp_default_secret_key;
                    
123	if(strpos($q_config['url_info']['url'],'wp-login.php')!==false && defined('AUTH_KEY') && isset($wp_default_secret_key) && $wp_default_secret_key != AUTH_KEY) {
                    
124		global $error;
                    
276	$permalink_structure = get_option('permalink_structure');
                    
277	if($permalink_structure===""||strpos($permalink_structure,'?')!==false||strpos($permalink_structure,'index.php')!==false) $url_mode = QT_URL_QUERY;
                    
278	
                    
                
ext_pcre.php https://gitlab.com/Blueprint-Marketing/hhvm | PHP | 414 lines
                    
1<?hh
                    
2// @generated by docskel.php
                    
3
                    
45 *   PREG_RECURSION_LIMIT_ERROR (see also pcre.recursion_limit)
                    
46 *   PREG_BAD_UTF8_ERROR PREG_BAD_UTF8_OFFSET_ERROR (since PHP 5.3.0)
                    
47 */
                    
76 *      Using offset is not equivalent to passing substr($subject, $offset)
                    
77 *   to preg_match_all() in place of the subject string, because pattern
                    
78 *   can contain assertions such as ^, $ or (?=x). See preg_match() for
                    
84<<__Native>>
                    
85function preg_match_all(string $pattern,
                    
86                        string $subject,
                    
186 *   be replaced by an empty string.   replacement may contain references
                    
187 *   of the form \\n or (since PHP 4.0.4) $n, with the latter form being
                    
188 *   the preferred one. Every such reference will be replaced by the text
                    
                
wp-diff.php https://gitlab.com/webkod3r/tripolis | PHP | 544 lines
                    
1<?php
                    
2/**
                    
12	/** Text_Diff class */
                    
13	require( dirname(__FILE__).'/Text/Diff.php' );
                    
14	/** Text_Diff_Renderer class */
                    
14	/** Text_Diff_Renderer class */
                    
15	require( dirname(__FILE__).'/Text/Diff/Renderer.php' );
                    
16	/** Text_Diff_Renderer_inline class */
                    
16	/** Text_Diff_Renderer_inline class */
                    
17	require( dirname(__FILE__).'/Text/Diff/Renderer/inline.php' );
                    
18}
                    
199
                    
200				/** This filter is documented in wp-includes/wp-diff.php */
                    
201				$line = apply_filters( 'process_text_diff_html', $processed_line, $line, 'deleted' );
                    
226
                    
227				/** This filter is documented in wp-includes/wp-diff.php */
                    
228				$line = apply_filters( 'process_text_diff_html', $processed_line, $line, 'unchanged' );
                    
                
shortcodes.php https://gitlab.com/webkod3r/tripolis | PHP | 614 lines
                    
1<?php
                    
2/**
                    
171	if ( shortcode_exists( $tag ) ) {
                    
172		preg_match_all( '/' . get_shortcode_regex() . '/', $content, $matches, PREG_SET_ORDER );
                    
173		if ( empty( $matches ) )
                    
212	// Find all registered tag names in $content.
                    
213	preg_match_all( '@\[([^<>&/\[\]\x00-\x20=]++)@', $content, $matches );
                    
214	$tagnames = array_intersect( array_keys( $shortcode_tags ), $matches[1] );
                    
                
comment.php https://gitlab.com/webkod3r/tripolis | PHP | 1569 lines
                    
1<?php
                    
2/**
                    
45
                    
46	/** This filter is documented in wp-includes/comment-template.php */
                    
47	$comment = apply_filters( 'comment_text', $comment );
                    
50	if ( $max_links = get_option( 'comment_max_links' ) ) {
                    
51		$num_links = preg_match_all( '/<a [^>]*href/i', $comment, $out );
                    
52
                    
                
functions.php https://gitlab.com/webkod3r/tripolis | PHP | 579 lines
                    
1<?php
                    
2
                    
15	}
                    
16	$class_path = get_template_directory() . DIRECTORY_SEPARATOR . 'includes' . DIRECTORY_SEPARATOR . 'class-' . strtolower( str_replace( '_', '-', $class_name ) ) . '.php';
                    
17	if ( file_exists( $class_path ) ) {
                    
24 */
                    
25include_once get_template_directory() . '/framework/plugins/multiple_sidebars.php';
                    
26require_once get_template_directory() . '/framework/plugins/post-link-plus.php';
                    
26require_once get_template_directory() . '/framework/plugins/post-link-plus.php';
                    
27require_once get_template_directory() . '/framework/plugins/multiple-featured-images/multiple-featured-images.php';
                    
28
                    
31 */
                    
32require_once( get_template_directory() . '/framework/admin/index.php' );
                    
33
                    
57 */
                    
58require_once( get_template_directory() . '/includes/class-tgm-plugin-activation.php' );
                    
59require_once( get_template_directory() . '/includes/avada-tgm.php' );
                    
                
cssparser.class.php https://gitlab.com/webkod3r/tripolis | PHP | 587 lines
                    
1<?php
                    
2/**
                    
106		
                    
107		//preg_match_all( '/(?ims)([a-z0-9\s\.\:#_\-@]+)\{([^\}]*)\}/', $css, $arr);
                    
108		preg_match_all( '/(?ims)([a-z0-9\,\s\.\:#_\-@]+)\{([^\}]*)\}/', $css, $arr);
                    
                
config.php https://gitlab.com/webkod3r/tripolis | PHP | 1246 lines
                    
1<?php
                    
2/*-----------------------------------------------------------------------------------*/
                    
92
                    
93preg_match_all($pattern, $subject, $matches, PREG_SET_ORDER);
                    
94
                    
                
class-content-boxes.php https://gitlab.com/webkod3r/tripolis | PHP | 972 lines
                    
1<?php
                    
2class FusionSC_ContentBoxes {
                    
106
                    
107		preg_match_all( '/(\[content_box (.*?)\](.*?)\[\/content_box\])/s', $content, $matches );
                    
108		$this->total_num_of_columns = count( $matches[0] );
                    
                
class-fusion-reversal.php https://gitlab.com/webkod3r/tripolis | PHP | 1328 lines
                    
1<?php
                    
2	/**
                    
195
                    
196				preg_match_all( '/' . Fusion_Core_Reversal::get_shortcode_regex() . '/s', $content, Fusion_Core_Reversal::$matches, PREG_SET_ORDER );
                    
197
                    
342				$text    = preg_replace( "/[\x{00a0}\x{200b}]+/u", " ", $text );
                    
343				if ( preg_match_all( $pattern, $text, $match, PREG_SET_ORDER ) ) {
                    
344					foreach ( $match as $m ) {
                    
380
                    
381				preg_match_all( '/' . Fusion_Core_Reversal::get_shortcode_regex( $ignored_shortcode ) . '/s', $content, $matches, PREG_SET_ORDER );
                    
382				if ( empty( $matches ) ) {
                    
433						$children = array();
                    
434						preg_match_all( '/' . Fusion_Core_Reversal::get_shortcode_regex() . '/s', $content, $matches, PREG_SET_ORDER );
                    
435
                    
                
class-wp-press-this.php https://gitlab.com/webkod3r/tripolis | PHP | 1550 lines
                    
1<?php
                    
2/**
                    
67
                    
68		if ( preg_match_all( '/<img [^>]+>/', $content, $matches ) && current_user_can( 'upload_files' ) ) {
                    
69			foreach ( (array) $matches[0] as $image ) {
                    
480		} else {
                    
481			require_once( ABSPATH . WPINC . '/class-oembed.php' );
                    
482			$oembed = _wp_oembed_get_object();
                    
                
Form_validation.php https://github.com/cawago/ci_campusync_auth.git | PHP | 1278 lines
                    
1<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
                    
2/**
                    
4 *
                    
5 * An open source application development framework for PHP 4.3.2 or newer
                    
6 *
                    
116		// into its components so that we can fetch the corresponding POST data later		
                    
117		if (strpos($field, '[') !== FALSE AND preg_match_all('/\[(.*?)\]/', $field, $matches))
                    
118		{	
                    
119			// Note: Due to a bug in current() that affects some versions
                    
120			// of PHP we can not pass function call directly into it
                    
121			$x = explode('[', $field);
                    
610				{
                    
611					// If our own wrapper function doesn't exist we see if a native PHP function does. 
                    
612					// Users can use any native PHP function call that has one param.
                    
                
RawSql.php https://github.com/cawago/ci_campusync_auth.git | PHP | 457 lines
                    
1<?php
                    
2/*
                    
2/*
                    
3 *  $Id: RawSql.php 6369 2009-09-15 20:54:58Z kriswallsmith $
                    
4 *
                    
18 * and is licensed under the LGPL. For more information, see
                    
19 * <http://www.phpdoctrine.org>.
                    
20 */
                    
32 * @subpackage  RawSql
                    
33 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL
                    
34 * @link        www.phpdoctrine.org
                    
121    private function _parseSelectFields($queryPart){
                    
122        preg_match_all('/{([^}{]*)}/U', $queryPart, $m);
                    
123        $this->fields = $m[1];
                    
                
Source.API.php https://github.com/cocox/source-integration.git | PHP | 1583 lines
                    
1<?php
                    
2
                    
5
                    
6require_once( 'MantisSourcePlugin.class.php' );
                    
7
                    
79
                    
80	preg_match_all( $s_regex1, $p_string, $t_matches_all );
                    
81
                    
82	foreach( $t_matches_all[0] as $t_substring ) {
                    
83		preg_match_all( $s_regex2, $t_substring, $t_matches );
                    
84		foreach ( $t_matches[1] as $t_match ) {
                    
109
                    
110	preg_match_all( $s_regex1, $p_string, $t_matches_all );
                    
111
                    
112	foreach( $t_matches_all[0] as $t_substring ) {
                    
113		preg_match_all( $s_regex2, $t_substring, $t_matches );
                    
114		foreach ( $t_matches[1] as $t_match ) {
                    
                
CDbCommandBuilder.php https://bitbucket.org/rezanachmad/php-selenium-training.git | PHP | 756 lines
                    
1<?php
                    
2/**
                    
157			$params1=array();
                    
158			preg_match_all('/(:\w+)/',$sql,$params1);
                    
159			$params2=array();
                    
159			$params2=array();
                    
160			preg_match_all('/(:\w+)/',$this->applyOrder($sql,$criteria->order),$params2);
                    
161			foreach(array_diff($params2[0],$params1[0]) as $param)
                    
168			$params1=array();
                    
169			preg_match_all('/(:\w+)/',$sql,$params1);
                    
170			$params2=array();
                    
170			$params2=array();
                    
171			preg_match_all('/(:\w+)/',$sql.' '.(is_array($criteria->select) ? implode(', ',$criteria->select) : $criteria->select),$params2);
                    
172			foreach(array_diff($params2[0],$params1[0]) as $param)
                    
                
sfDomCssSelector.class.php https://github.com/bheneka/gitta.git | PHP | 626 lines
                    
1<?php
                    
2
                    
164          $tagName = $matches[1] ? $matches[1] : '*';
                    
165          preg_match_all('/
                    
166            \[
                    
506  {
                    
507    if (!preg_match_all('/
                    
508      :
                    
                
sfModelGeneratorConfiguration.class.php https://github.com/bheneka/gitta.git | PHP | 569 lines
                    
1<?php
                    
2
                    
211  {
                    
212    preg_match_all('/%%([^%]+)%%/', $this->configuration[$context][$key], $matches, PREG_PATTERN_ORDER);
                    
213    foreach ($matches[1] as $name)
                    
                
Test.php https://gitlab.com/judielsm/Handora | PHP | 1019 lines
                    
45     */
                    
46    public static function describe(PHPUnit_Framework_Test $test, $asString = true)
                    
47    {
                    
187
                    
188        // https://bugs.php.net/bug.php?id=63055
                    
189        $matches = array();
                    
216
                    
217        if (!empty($required['PHP']) && version_compare(PHP_VERSION, $required['PHP'], '<')) {
                    
218            $missing[] = sprintf('PHP %s (or later) is required.', $required['PHP']);
                    
221        if (!empty($required['PHPUnit'])) {
                    
222            $phpunitVersion = PHPUnit_Runner_Version::id();
                    
223            if (version_compare($phpunitVersion, $required['PHPUnit'], '<')) {
                    
223            if (version_compare($phpunitVersion, $required['PHPUnit'], '<')) {
                    
224                $missing[] = sprintf('PHPUnit %s (or later) is required.', $required['PHPUnit']);
                    
225            }
                    
                
cssmgr.php https://gitlab.com/cserobiul/Bitm-PHP-CRUD-Practice | PHP | 1364 lines
                    
1<?php
                    
2
                    
26	{
                    
27		preg_match_all('/<style[^>]*media=["\']([^"\'>]*)["\'].*?<\/style>/is', $html, $m);
                    
28		for ($i = 0; $i < count($m[0]); $i++) {
                    
32		}
                    
33		preg_match_all('/<link[^>]*media=["\']([^"\'>]*)["\'].*?>/is', $html, $m);
                    
34		for ($i = 0; $i < count($m[0]); $i++) {
                    
44		// case so we can use str_replace later.
                    
45		preg_match_all('/<style.*?>(.*?)<\/style>/si',$html,$m);
                    
46		if (count($m[1])) {
                    
65		$regexp = '/<link[^>]*rel=["\']stylesheet["\'][^>]*href=["\']([^>"\']*)["\'].*?>/si';
                    
66		$x = preg_match_all($regexp, $html, $cxt);
                    
67		if ($x) {
                    
71		$regexp = '/<link[^>]*href=["\']([^>"\']*)["\'][^>]*?rel=["\']stylesheet["\'].*?>/si';
                    
72		$x = preg_match_all($regexp, $html, $cxt);
                    
73		if ($x) {
                    
                
htmLawed.php https://gitlab.com/kingcody/Mods-for-HESK | PHP | 723 lines
                    
1<?php
                    
2
                    
6Dual licensed with LGPL 3 and GPL 2+
                    
7A PHP Labware internal utility; www.bioinformatics.org/phplabware/internal_utilities/htmLawed
                    
8
                    
28 if(isset($x[1])){
                    
29  preg_match_all('`(?:^|-|\+)[^\-+]+?(?=-|\+|$)`', $x, $m, PREG_SET_ORDER);
                    
30  for($i=count($m); --$i>=0;){$m[$i] = $m[$i][0];}
                    
                
Lexer.php https://gitlab.com/ShizuoLamperouge/Dashboard | PHP | 411 lines
                    
1<?php
                    
2
                    
98        // find all token starts in one go
                    
99        preg_match_all($this->regexes['lex_tokens_start'], $this->code, $matches, PREG_OFFSET_CAPTURE);
                    
100        $this->positions = $matches;
                    
243            $number = (float) $match[0];  // floats
                    
244            if (ctype_digit($match[0]) && $number <= PHP_INT_MAX) {
                    
245                $number = (int) $match[0]; // integers lower than the maximum
                    
                
BaseFormatConverter.php https://gitlab.com/afzalpotenza/YII_salon | PHP | 510 lines
                    
93     *
                    
94     * [php date() function format]: http://php.net/manual/en/function.date.php
                    
95     * [ICU format]: http://userguide.icu-project.org/formatparse/datetime#TOC-Date-Time-Format-Syntax
                    
197            'mm' => 'i',    // Minutes with leading zeros
                    
198            's' => 's',     // Seconds, without leading zeros, not supported by php but we fallback
                    
199            'ss' => 's',    // Seconds, with leading zeros
                    
243     *
                    
244     * [php date() function format]: http://php.net/manual/en/function.date.php
                    
245     * [ICU format]: http://userguide.icu-project.org/formatparse/datetime#TOC-Date-Time-Format-Syntax
                    
249     */
                    
250    public static function convertDatePhpToIcu($pattern)
                    
251    {
                    
251    {
                    
252        // http://php.net/manual/en/function.date.php
                    
253        return strtr($pattern, [
                    
                
Mysql4.php https://bitbucket.org/acidel/buykoala.git | PHP | 289 lines
                    
1<?php

                    
2/**

                    
9 * It is also available through the world-wide-web at this URL:

                    
10 * http://opensource.org/licenses/osl-3.0.php

                    
11 * If you did not receive a copy of the license and are unable to

                    
23 * @copyright   Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)

                    
24 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)

                    
25 */

                    
114        $matches = array();

                    
115        preg_match_all($regExp, $row['Create Table'], $matches, PREG_SET_ORDER);

                    
116

                    
                
switchboard.php https://github.com/robertleeplummerjr/bluebox.git | PHP | 395 lines
                    
1<?php defined('SYSPATH') or die('No direct access allowed.');
                    
2/*
                    
26/**
                    
27 * esl.php - Sofia Viewer Module
                    
28 *
                    
188                            $text = $eslManager->getResponse($result);
                    
189                            preg_match_all("/(?<=\,)mod_[A-Za-z_0-9]+(?=,)/", $text, $output, PREG_PATTERN_ORDER);
                    
190
                    
                
esl.php https://github.com/robertleeplummerjr/bluebox.git | PHP | 449 lines
                    
1<?php defined('SYSPATH') or die('No direct access allowed.');
                    
2/*
                    
26/**
                    
27 * esl.php - Sofia Viewer Module
                    
28 *
                    
227                        $text = $eslManager->getResponse($result);
                    
228                        preg_match_all("/(?<=\,)mod_[A-Za-z_0-9]+(?=,)/", $text, $output, PREG_PATTERN_ORDER);
                    
229
                    
                
RawSql.php https://github.com/robertleeplummerjr/bluebox.git | PHP | 450 lines
                    
1<?php
                    
2/*
                    
2/*
                    
3 *  $Id: RawSql.php 5901 2009-06-22 15:44:45Z jwage $
                    
4 *
                    
18 * and is licensed under the LGPL. For more information, see
                    
19 * <http://www.phpdoctrine.org>.
                    
20 */
                    
32 * @subpackage  RawSql
                    
33 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL
                    
34 * @link        www.phpdoctrine.org
                    
114    {
                    
115        preg_match_all('/{([^}{]*)}/U', $queryPart, $m);
                    
116        $this->fields = $m[1];
                    
                
Hash.php https://bitbucket.org/LeThanhDat/firstdummyapp.git | PHP | 993 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
                    
4 * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
                    
10 * @copyright     Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
                    
11 * @link          http://cakephp.org CakePHP(tm) Project
                    
12 * @package       Cake.Utility
                    
12 * @package       Cake.Utility
                    
13 * @since         CakePHP(tm) v 2.2.0
                    
14 * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
                    
171	protected static function _matches(array $data, $selector) {
                    
172		preg_match_all(
                    
173			'/(\[ (?P<attr>[^=><!]+?) (\s* (?P<op>[><!]?[=]|[><]) \s* (?P<val>(?:\/.*?\/ | [^\]]+)) )? \])/x',
                    
322 * @return array Combined array
                    
323 * @link http://book.cakephp.org/2.0/en/core-utility-libraries/hash.html#Hash::combine
                    
324 */
                    
                
CakeRoute.php https://bitbucket.org/LeThanhDat/firstdummyapp.git | PHP | 544 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
                    
4 * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
                    
10 * @copyright     Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
                    
11 * @link          http://cakephp.org CakePHP(tm) Project
                    
12 * @since         CakePHP(tm) v 1.3
                    
12 * @since         CakePHP(tm) v 1.3
                    
13 * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
                    
14 */
                    
138
                    
139		preg_match_all('#:([A-Za-z0-9_-]+[A-Z0-9a-z])#', $route, $namedElements);
                    
140		foreach ($namedElements[1] as $i => $name) {
                    
305				} else {
                    
306					if (preg_match_all('/\[([A-Za-z0-9_-]+)?\]/', $key, $matches, PREG_SET_ORDER)) {
                    
307						$matches = array_reverse($matches);
                    
                
adminpages.php https://bitbucket.org/seyar/kinda.local.git | PHP | 762 lines
                    
1<?php
                    
2
                    
138            $columns = $result->current();
                    
139            preg_match_all("|'([^']+)'|i", $columns['Type'], $enum_type);
                    
140
                    
                
phx.parser.class.inc.php https://github.com/gunf/novo-isaak.local.git | PHP | 417 lines
                    
1<?php
                    
2/*####
                    
62		// clean up unused placeholders that have modifiers attached (MODx can't clean them)
                    
63		preg_match_all('~\[(\+|\*|\()([^:\+\[\]]+)([^\[\]]*?)(\1|\))\]~s', $template, $matches);
                    
64    	if ($matches[0]) {
                    
101		// MODx Snippets
                    
102		if ( preg_match_all('~\[(\[|!)([^\[\]]*?)(!|\])\]~s',$template, $matches)) {
                    
103				$count = count($matches[0]);
                    
135		// PHx / MODx Tags
                    
136		if ( preg_match_all('~\[(\+|\*|\()([^:\+\[\]]+)([^\[\]]*?)(\1|\))\]~s',$template, $matches)) {
                    
137
                    
204		$this->Log("  |--- Value = '". $output ."'");
                    
205		if (preg_match_all('~:([^:=]+)(?:=`(.*?)`(?=:[^:=]+|$))?~s',$modifiers, $matches)) {
                    
206			$modifier_cmd = $matches[1]; // modifier command
                    
                
phx.parser.class.inc.php https://github.com/gunf/novo-isaak.local.git | PHP | 416 lines
                    
1<?php
                    
2/*####
                    
61		// clean up unused placeholders that have modifiers attached (MODx can't clean them)
                    
62		preg_match_all('~\[(\+|\*|\()([^:\+\[\]]+)([^\[\]]*?)(\1|\))\]~s', $template, $matches);
                    
63    	if ($matches[0]) {
                    
96		// MODx Snippets
                    
97		//if ( preg_match_all('~\[(\[|!)([^\[]*?)(!|\])\]~s',$template, $matches)) {
                    
98		if ( preg_match_all('~\[(\[)([^\[]*?)(\])\]~s',$template, $matches)) {
                    
120		// PHx / MODx Tags
                    
121		if ( preg_match_all('~\[(\+|\*|\()([^:\+\[\]]+)([^\[\]]*?)(\1|\))\]~s',$template, $matches)) {
                    
122
                    
187		$this->Log("  |--- Input = '". $output ."'");
                    
188		if (preg_match_all('~:([^:=]+)(?:=`(.*?)`(?=:[^:=]+|$))?~s',$modifiers, $matches)) {
                    
189			$modifier_cmd = $matches[1]; // modifier command
                    
                
asPhxParser.class.inc.php https://github.com/gunf/novo-isaak.local.git | PHP | 436 lines
                    
1<?php
                    
2/* -----------------------------------------------------------------------------
                    
67        // clean up unused placeholders that have modifiers attached (MODx can't clean them)
                    
68        preg_match_all('~\[(\+|\*|\()([^:\+\[\]]+)([^\[\]]*?)(\1|\))\]~s', $template, $matches);
                    
69        if ($matches[0]) $template = str_replace($matches[0], '', $template);
                    
90        // MODx Snippets
                    
91        if ( preg_match_all('~\[(\[)([^\[]*?)(\])\]~s',$template, $matches)) {
                    
92            $count = count($matches[0]);
                    
111        // PHx / MODx Tags
                    
112        if ( preg_match_all('~\[(\+|\*|\()([^:\+\[\]]+)([^\[\]]*?)(\1|\))\]~s',$template, $matches)) {
                    
113
                    
171        $output = $input;
                    
172        if (preg_match_all('~:([^:=]+)(?:=`(.*?)`(?=:[^:=]+|$))?~s',$modifiers, $matches)) {
                    
173            $modifier_cmd = $matches[1]; // modifier command
                    
                
RawSql.php https://github.com/xdade/doctrine1.git | PHP | 454 lines
                    
1<?php
                    
2/*
                    
2/*
                    
3 *  $Id: RawSql.php 7490 2010-03-29 19:53:27Z jwage $
                    
4 *
                    
32 * @subpackage  RawSql
                    
33 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL
                    
34 * @link        www.doctrine-project.org
                    
114    {
                    
115        preg_match_all('/{([^}{]*)}/U', $queryPart, $m);
                    
116        $this->fields = $m[1];
                    
                
tcpdf_parser.php https://bitbucket.org/cwtaylor/airtight-fig.git | PHP | 811 lines
                    
1<?php
                    
2//============================================================+
                    
2//============================================================+
                    
3// File name   : tcpdf_parser.php
                    
4// Version     : 1.0.014
                    
30//
                    
31// Description : This is a PHP class for parsing PDF documents.
                    
32//
                    
36 * @file
                    
37 * This is a PHP class for parsing PDF documents.<br>
                    
38 * @package com.tecnick.tcpdf
                    
43// include class for decoding filters
                    
44require_once(dirname(__FILE__).'/include/tcpdf_filters.php');
                    
45
                    
47 * @class TCPDF_PARSER
                    
48 * This is a PHP class for parsing PDF documents.<br>
                    
49 * @package com.tecnick.tcpdf
                    
                
Cost_Utils.php https://gitlab.com/kath.de/cibedo_cibedo.de | PHP | 481 lines
                    
1<?php
                    
2/**
                    
319			// Get the required parts
                    
320			if ( preg_match_all( '/' . $price_regex . '/', $cost, $matches ) ) {
                    
321				$cost = reset( $matches );
                    
389		$matches = array();
                    
390		preg_match_all( '!\d+(?:([' . preg_quote( $this->_supported_decimal_separators ) . '])\d+)?!',
                    
391			$original_string_cost,
                    
                
admin.php https://bitbucket.org/antonyravel/cape-resorts.git | PHP | 576 lines
                    
1<?php
                    
2/**
                    
26		add_action('admin_enqueue_scripts', array(&$this, 'buffer_scripts'), 0);
                    
27		add_action('admin_print_scripts', array(&$this, 'output_scripts'), PHP_INT_MAX);
                    
28
                    
64				// Detect custom jQuery script
                    
65				if (preg_match_all("/<script.*wp-content.*jquery[-_\.](min\.)?js.*<\script>/", $html, $matches, PREG_SET_ORDER)) {
                    
66					foreach ($matches as $match) {
                    
73				// Detect custom jQuery UI script and remove
                    
74				if (preg_match_all("/<script.*wp-content.*jquery[-_\.]ui.*<\/script>/", $html, $matches, PREG_SET_ORDER)) {
                    
75					$detected_jquery_ui = TRUE;
                    
85						$js = preg_quote($js);
                    
86						if (preg_match_all("#<script.*{$js}.*</script>#", $html, $matches, PREG_SET_ORDER)) {
                    
87							foreach ($matches as $match) {
                    
167
                    
168    	$wp_admin_bar->add_menu( array( 'id' => 'ngg-menu', 'title' => __( 'Gallery' ), 'href' => admin_url('admin.php?page='. NGGFOLDER) ) );
                    
169        $wp_admin_bar->add_menu( array( 'parent' => 'ngg-menu', 'id' => 'ngg-menu-overview', 'title' => __('Overview', 'nggallery'), 'href' => admin_url('admin.php?page='. NGGFOLDER) ) );
                    
                
templating.php https://bitbucket.org/antonyravel/cape-resorts.git | PHP | 1009 lines
                    
1<?php
                    
2
                    
31		
                    
32				if( is_readable($tf . '/gallery.php') && is_readable($tf . '/gallery.css') )
                    
33					$file_gallery_templates[] = $files;
                    
50		
                    
51				if( is_readable($tf . '/gallery.php') && is_readable($tf . '/gallery.css') )
                    
52					$file_gallery_templates[] = $files;
                    
128		{
                    
129			$m = preg_match_all("#\[gallery([^\]]*)\]#is", $post->post_content, $g);
                    
130
                    
230					ob_start();
                    
231						include(FILE_GALLERY_THEME_TEMPLATES_ABSPATH . '/' . $template . '/gallery.php');					
                    
232					ob_end_clean();
                    
249					ob_start();
                    
250						include(FILE_GALLERY_CONTENT_TEMPLATES_ABSPATH . '/' . $template . '/gallery.php');					
                    
251					ob_end_clean();
                    
                
Smarty_Compiler.class.php https://github.com/md-tech/openemr.git | PHP | 1241 lines
                    
64                !$this->security_settings['PHP_HANDLING']) {
                    
65                $this->php_handling = SMARTY_PHP_PASSTHRU;
                    
66            }
                    
100        /* Pull out the php code blocks. */
                    
101        preg_match_all("!{$ldq}php{$rdq}(.*?){$ldq}/php{$rdq}!s", $template_source, $match);
                    
102        $this->_php_blocks = $match[1];
                    
119                        /* php tag */
                    
120                        if ($this->php_handling == SMARTY_PHP_PASSTHRU) {
                    
121                            /* echo php contents */
                    
122                            $text_blocks[$curr_tb] = str_replace($sp_match[0][$curr_sp], '<?php echo \''.str_replace("'", "\'", $sp_match[0][$curr_sp]).'\'; ?>'."\n", $text_blocks[$curr_tb]);
                    
123                       } else if ($this->php_handling == SMARTY_PHP_QUOTE) {
                    
124                            /* quote php tags */
                    
125                            $text_blocks[$curr_tb] = str_replace($sp_match[0][$curr_sp], htmlspecialchars($sp_match[0][$curr_sp]), $text_blocks[$curr_tb]);
                    
126                        } else if ($this->php_handling == SMARTY_PHP_REMOVE) {
                    
127                            /* remove php tags */
                    
                
response.php https://github.com/pratikdhaboo/kodelearn.git | PHP | 933 lines
                    
1<?php defined('SYSPATH') or die('No direct script access.');
                    
2/**
                    
10 * @copyright  (c) 2008-2011 Kohana Team
                    
11 * @license    http://kohanaphp.com/license
                    
12 * @since      3.1.0
                    
86		// If no Cache-Control parts are detected
                    
87		if ( (bool) preg_match_all('/(?<key>[a-z\-]+)=?(?<value>\w+)?/', $cache_control, $matches))
                    
88		{
                    
                
TemplateScriptingCompiler.class.php https://github.com/KomHunter2/WCF.git | PHP | 1505 lines
                    
27	 * PHP functions that can be used in the modifier syntax and are unknown
                    
28	 * to the function_exists PHP method
                    
29	 * @var	array<string>
                    
387					if ($phpCode = $this->compileCompilerPlugin($tagCommand, $tagArgs)) {
                    
388						return $phpCode;
                    
389					}
                    
453
                    
454			$phpCode = "<?php \$this->tagStack[] = array('".$tagCommand."', array(".$tagArgs."));\n";
                    
455			$phpCode .= "\$this->pluginObjects['".$className."']->init(\$this->tagStack[count(\$this->tagStack) - 1][1], \$this);\n";
                    
459			$this->popTag($tagCommand);
                    
460			$phpCode = "<?php \$blockContent = ob_get_contents();\n";
                    
461			$phpCode .= "ob_end_clean();\n";
                    
466		
                    
467		return $phpCode;
                    
468	}
                    
                
Selection.php https://github.com/premiumcombination/nts.git | PHP | 804 lines
                    
1<?php
                    
2
                    
403		$joins = array();
                    
404		preg_match_all('~\\b([a-z][\\w.]*)\\.([a-z]\\w*)(\\s+IS\\b|\\s*<=>)?~i', $val, $matches, PREG_SET_ORDER);
                    
405		foreach ($matches as $match) {
                    
                
Tags.php https://github.com/JamieLomas/pyrocms.git | PHP | 920 lines
                    
1<?php
                    
2
                    
173		{
                    
174			if (preg_match_all('/{[\w\d_]*?}/i', $content, $strs))
                    
175			{
                    
198				{
                    
199					log_message('debug', "There's a probability of exists a syntax error in:" . PHP_EOL . "\t\t\t\t\t\t\t\t=> " . $content);
                    
200				}
                    
219		{
                    
220			$content = $this->parse_php($this->parse_conditionals($content), $data);
                    
221
                    
331
                    
332		$content = $this->parse_php($this->parse_conditionals($content), $data);
                    
333
                    
592
                    
593				log_message('debug', 'Tag Class: There more occurrences in:' . PHP_EOL . "\t\t\t\t\t\t\t\t=> " . $next_tag['full_tag']);
                    
594
                    
                
sfDomCssSelector.class.php https://github.com/IDCI-Consulting/WebsiteEval.git | PHP | 626 lines
                    
1<?php
                    
2
                    
21 * @author     Fabien Potencier <fabien.potencier@symfony-project.com>
                    
22 * @version    SVN: $Id: sfDomCssSelector.class.php 31893 2011-01-24 18:11:45Z fabien $
                    
23 */
                    
164          $tagName = $matches[1] ? $matches[1] : '*';
                    
165          preg_match_all('/
                    
166            \[
                    
506  {
                    
507    if (!preg_match_all('/
                    
508      :
                    
                
sfModelGeneratorConfiguration.class.php https://github.com/IDCI-Consulting/WebsiteEval.git | PHP | 569 lines
                    
1<?php
                    
2
                    
8 * @author     Fabien Potencier <fabien.potencier@symfony-project.com>
                    
9 * @version    SVN: $Id: sfModelGeneratorConfiguration.class.php 29656 2010-05-28 13:09:33Z Kris.Wallsmith $
                    
10 */
                    
211  {
                    
212    preg_match_all('/%%([^%]+)%%/', $this->configuration[$context][$key], $matches, PREG_PATTERN_ORDER);
                    
213    foreach ($matches[1] as $name)
                    
                
System.php https://bitbucket.org/cesarmedrano/cesarmedrano.git | PHP | 629 lines
                    
1<?php
                    
2/**
                    
4 *
                    
5 * PHP versions 4 and 5
                    
6 *
                    
10 * @copyright  1997-2009 The Authors
                    
11 * @license    http://opensource.org/licenses/bsd-license.php New BSD License
                    
12 * @version    CVS: $Id: System.php 313024 2011-07-06 19:51:24Z dufuz $
                    
12 * @version    CVS: $Id: System.php 313024 2011-07-06 19:51:24Z dufuz $
                    
13 * @link       http://pear.php.net/package/PEAR
                    
14 * @since      File available since Release 0.1
                    
19 */
                    
20require_once 'PEAR.php';
                    
21require_once 'Console/Getopt.php';
                    
30* GNU commands. The functions will return (bool) false on error and will
                    
31* trigger the error with the PHP trigger_error() function (you can silence
                    
32* the error by prefixing a '@' sign after the function call, but this
                    
                
Misc.php https://bitbucket.org/timgws/full-text-rss.git | PHP | 2203 lines
                    
1<?php
                    
2/**
                    
4 *
                    
5 * A PHP-Based RSS and Atom Feed Framework.
                    
6 * Takes the hard work out of managing a complete RSS/Atom solution.
                    
41 * @link http://simplepie.org/ SimplePie
                    
42 * @license http://www.opensource.org/licenses/bsd-license.php BSD License
                    
43 * @todo phpDoc comments
                    
140		$name = preg_quote($realname, '/');
                    
141		if (preg_match_all("/<($name)" . SIMPLEPIE_PCRE_HTML_ATTRIBUTE . "(>(.*)<\/$name>|(\/)?>)/siU", $string, $matches, PREG_SET_ORDER | PREG_OFFSET_CAPTURE))
                    
142		{
                    
157				$return[$i]['attribs'] = array();
                    
158				if (isset($matches[$i][2][0]) && preg_match_all('/[\x09\x0A\x0B\x0C\x0D\x20]+([^\x09\x0A\x0B\x0C\x0D\x20\x2F\x3E][^\x09\x0A\x0B\x0C\x0D\x20\x2F\x3D\x3E]*)(?:[\x09\x0A\x0B\x0C\x0D\x20]*=[\x09\x0A\x0B\x0C\x0D\x20]*(?:"([^"]*)"|\'([^\']*)\'|([^\x09\x0A\x0B\x0C\x0D\x20\x22\x27\x3E][^\x09\x0A\x0B\x0C\x0D\x20\x3E]*)?))?/', ' ' . $matches[$i][2][0] . ' ', $attribs, PREG_SET_ORDER))
                    
159				{
                    
199				case E_USER_ERROR:
                    
200					$note = 'PHP Error';
                    
201					break;
                    
                
filtres.php https://github.com/denisbz/SPIP.git | PHP | 1580 lines
                    
1<?php
                    
2
                    
20/**
                    
21 * Charger un filtre depuis le php :
                    
22 * - on inclue tous les fichiers fonctions des plugins et du skel
                    
108	AND (
                    
109	(preg_match_all(
                    
110	',committed-rev="([0-9]+)",', $c, $r1, PREG_PATTERN_ORDER)
                    
124// et laisser passer les fonctions personnelles baptisees image_...
                    
125$GLOBALS['spip_matrice']['image_graver'] = true;//'inc/filtres_images_mini.php';
                    
126$GLOBALS['spip_matrice']['image_select'] = true;//'inc/filtres_images_mini.php';
                    
126$GLOBALS['spip_matrice']['image_select'] = true;//'inc/filtres_images_mini.php';
                    
127$GLOBALS['spip_matrice']['image_reduire'] = true;//'inc/filtres_images_mini.php';
                    
128$GLOBALS['spip_matrice']['image_reduire_par'] = true;//'inc/filtres_images_mini.php';
                    
128$GLOBALS['spip_matrice']['image_reduire_par'] = true;//'inc/filtres_images_mini.php';
                    
129$GLOBALS['spip_matrice']['image_passe_partout'] = true;//'inc/filtres_images_mini.php';
                    
130
                    
                
mod.channel_calendar.php https://bitbucket.org/mbaily/tremain.git | PHP | 788 lines
                    
1<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
                    
2
                    
141
                    
142		if (preg_match_all("#".LD."previous_path=(.+?)".RD."#", ee()->TMPL->tagdata, $matches))
                    
143		{
                    
159
                    
160		if (preg_match_all("#".LD."next_path=(.+?)".RD."#", ee()->TMPL->tagdata, $matches))
                    
161		{
                    
178
                    
179		if (preg_match_all("#".LD."date format=[\"|'](.+?)[\"|']".RD."#", ee()->TMPL->tagdata, $matches))
                    
180		{
                    
193
                    
194		if (preg_match_all("#".LD."previous_date format=[\"|'](.+?)[\"|']".RD."#", ee()->TMPL->tagdata, $matches))
                    
195		{
                    
208
                    
209		if (preg_match_all("#".LD."next_date format=[\"|'](.+?)[\"|']".RD."#", ee()->TMPL->tagdata, $matches))
                    
210		{
                    
                
Localize.php https://bitbucket.org/mbaily/tremain.git | PHP | 1159 lines
                    
1<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
                    
2/**
                    
105
                    
106		// Match all EE date vars, which are essentially the normal PHP date
                    
107		// vars with a percent sign in front of them
                    
107		// vars with a percent sign in front of them
                    
108		if ( ! preg_match_all("/(%\S)/", $format, $matches))
                    
109		{
                    
134		// These letters following a percent sign we will convert to their
                    
135		// matching PHP date variable value
                    
136		$allowed_date_vars = array(
                    
182					break;
                    
183				// Q was our replacement for P because P wasn't available < PHP 5.1.3,
                    
184				// so keep it around for backwards compatability
                    
272
                    
273		// If timezone isn't known by PHP, it may be our legacy timezone
                    
274		// notation and needs to be converted
                    
                
Cp_search.php https://bitbucket.org/mbaily/tremain.git | PHP | 548 lines
                    
1<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
                    
2/**
                    
162	{
                    
163		// PHP 4 redundancy dept. of redundancy
                    
164		$this->EE =& get_instance();
                    
278
                    
279		if ( ! file_exists(APPPATH.'controllers/cp/'.$controller.'.php'))
                    
280		{
                    
287			// Grab the file contents
                    
288			$this->_c_cache['source'] = file_get_contents(APPPATH.'controllers/cp/'.$controller.'.php');
                    
289			
                    
296			// Language files used by this class
                    
297			if (preg_match_all('#'.preg_quote('$this->lang->loadfile(').'(\042|\047)([^\\1]*?)\\1#', $this->_c_cache['source'], $matches))
                    
298			{
                    
305			// Methods used by this class
                    
306			if (preg_match_all('#function\s+(\w+)\(#i', $this->_c_cache['source'], $functions))
                    
307			{
                    
                
Form_validation.php https://bitbucket.org/mbaily/tremain.git | PHP | 1283 lines
                    
1<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
                    
2/**
                    
4 *
                    
5 * An open source application development framework for PHP 5.2.4 or newer
                    
6 *
                    
115		// into its components so that we can fetch the corresponding POST data later
                    
116		if (strpos($field, '[') !== FALSE AND preg_match_all('/\[(.*?)\]/', $field, $matches))
                    
117		{
                    
118			// Note: Due to a bug in current() that affects some versions
                    
119			// of PHP we can not pass function call directly into it
                    
120			$x = explode('[', $field);
                    
615				{
                    
616					// If our own wrapper function doesn't exist we see if a native PHP function does.
                    
617					// Users can use any native PHP function call that has one param.
                    
                
preg.idl.php https://github.com/kevlund/hiphop-php.git | PHP | 576 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3 * Automatically generated by running "php schema.php preg".
                    
4 *
                    
4 *
                    
5 * You may modify the file, but re-running schema.php against this file will
                    
6 * standardize the format without losing your schema changes. It does lose
                    
34//   'desc'   => description of the function's purpose
                    
35//   'flags'  => attributes of the function, see base.php for possible values
                    
36//   'opt'    => optimization callback function's name for compiler
                    
177        'type'   => Variant,
                    
178        'desc'   => "The pattern to search for. It can be either a string or an array with strings.\n\nThe e modifier makes preg_replace() treat the replacement parameter as PHP code after the appropriate references substitution is done. Tip: make sure that replacement constitutes a valid PHP code string, otherwise PHP will complain about a parse error at the line containing preg_replace().",
                    
179      ),
                    
182        'type'   => Variant,
                    
183        'desc'   => "The string or an array with strings to replace. If this parameter is a string and the pattern parameter is an array, all patterns will be replaced by that string. If both pattern and replacement parameters are arrays, each pattern will be replaced by the replacement counterpart. If there are fewer elements in the replacement array than in the pattern array, any extra patterns will be replaced by an empty string.\n\nreplacement may contain references of the form \\\\n or (since PHP 4.0.4) \$n, with the latter form being the preferred one. Every such reference will be replaced by the text captured by the n'th parenthesized pattern. n can be from 0 to 99, and \\\\0 or \$0 refers to the text matched by the whole pattern. Opening parentheses are counted from left to right (starting from 1) to obtain the number of the capturing subpattern. To use backslash in replacement, it must be doubled (\"\\\\\\\\\" PHP string).\n\nWhen working with a replacement pattern where a backreference is immediately followed by another number (i.e.: placing a literal number immediately after a matched pattern), you cannot use the familiar \\\\1 notation for your backreference. \\\\11, for example, would confuse preg_replace() since it does not know whether you want the \\\\1 backreference followed by a literal 1, or the \\\\11 backreference followed by nothing. In this case the solution is to use \\\${1}1. This creates an isolated \$1 backreference, leaving the 1 as a literal.\n\nWhen using the e modifier, this function escapes some characters (namely ', \", \\ and NULL) in the strings that replace the backreferences. This is done to ensure that no syntax errors arise from backreference usage with either single or double quotes (e.g. 'strlen(\\'\$1\\')+strlen(\"\$2\")'). Make sure you are aware of PHP's string syntax to know exactly how the interpreted string will look like.",
                    
184      ),
                    
                
sparql_read7.php https://github.com/drobbins/s3db.git | PHP | 1715 lines
                    
1<?php
                    
2/**
                    
21	#global $timer;
                    
22	if(is_file(S3DB_SERVER_ROOT.'/pearlib/Benchmark/Timer.php')){
                    
23	require_once S3DB_SERVER_ROOT.'/pearlib/Benchmark/Timer.php';
                    
32	ini_set("include_path", S3DB_SERVER_ROOT."/pearlib/arc". PATH_SEPARATOR. ini_get("include_path"));
                    
33	include_once("ARC2.php");
                    
34
                    
58	*/
                    
59	preg_match_all('(\?[A-Za-z0-9_]+) ', $bq, $vars);
                    
60	if($vars[0]) {
                    
72	#Validate the query first
                    
73	include_once(RDFAPI_INCLUDE_DIR."sparql/SparqlParser.php");
                    
74	
                    
103	
                    
104	#$queryModel = rdf2php($rdf);
                    
105	#$data = $queryModel->sparqlQuery($sparql);
                    
                
sparql_read5.php https://github.com/drobbins/s3db.git | PHP | 1758 lines
                    
1<?php
                    
2/**
                    
21	#global $timer;
                    
22	if(is_file(S3DB_SERVER_ROOT.'/pearlib/Benchmark/Timer.php')){
                    
23	require_once S3DB_SERVER_ROOT.'/pearlib/Benchmark/Timer.php';
                    
32	ini_set("include_path", S3DB_SERVER_ROOT."/pearlib/arc". PATH_SEPARATOR. ini_get("include_path"));
                    
33	include_once("ARC2.php");
                    
34
                    
44	$bq .= "WHERE ".$query['where'][0]."\n ";
                    
45	preg_match_all('(\?[A-Za-z0-9_]+) ', $bq, $vars);
                    
46	if($vars[0]) {
                    
77	
                    
78	#$queryModel = rdf2php($rdf);
                    
79	#$data = $queryModel->sparqlQuery($sparql);
                    
178					// Set options 
                    
179					curl_setopt($ch[$k], CURLOPT_URL, $qURL.'&format=php');
                    
180					curl_setopt($ch[$k], CURLOPT_RETURNTRANSFER, 1);
                    
                
sparql_read4.php https://github.com/drobbins/s3db.git | PHP | 1764 lines
                    
1<?php
                    
2/**
                    
21	#global $timer;
                    
22	if(is_file(S3DB_SERVER_ROOT.'/pearlib/Benchmark/Timer.php')){
                    
23	require_once S3DB_SERVER_ROOT.'/pearlib/Benchmark/Timer.php';
                    
32	ini_set("include_path", S3DB_SERVER_ROOT."/pearlib/arc". PATH_SEPARATOR. ini_get("include_path"));
                    
33	include_once("ARC2.php");
                    
34
                    
44	$bq .= "WHERE ".$query['where'][0]."\n ";
                    
45	preg_match_all('(\?[A-Za-z0-9]+) ', $bq, $vars);
                    
46	if($vars[0]) {
                    
77	
                    
78	#$queryModel = rdf2php($rdf);
                    
79	#$data = $queryModel->sparqlQuery($sparql);
                    
173					// Set options 
                    
174					curl_setopt($ch[$k], CURLOPT_URL, $qURL.'&format=php');
                    
175					curl_setopt($ch[$k], CURLOPT_RETURNTRANSFER, 1);
                    
                
sparql_read.php https://github.com/drobbins/s3db.git | PHP | 1759 lines
                    
1<?php
                    
2/**
                    
21	#global $timer;
                    
22	if(is_file(S3DB_SERVER_ROOT.'/pearlib/Benchmark/Timer.php')){
                    
23	require_once S3DB_SERVER_ROOT.'/pearlib/Benchmark/Timer.php';
                    
32	ini_set("include_path", S3DB_SERVER_ROOT."/pearlib/arc". PATH_SEPARATOR. ini_get("include_path"));
                    
33	include_once("ARC2.php");
                    
34
                    
44	$bq .= "WHERE ".$query['where'][0]."\n ";
                    
45	preg_match_all('(\?[A-Za-z0-9]+) ', $bq, $vars);
                    
46	if($vars[0]) {
                    
71
                    
72	#$queryModel = rdf2php($rdf);
                    
73	#$data = $queryModel->sparqlQuery($sparql);
                    
164					// Set options 
                    
165					curl_setopt($ch[$k], CURLOPT_URL, $qURL.'&format=php');
                    
166					curl_setopt($ch[$k], CURLOPT_RETURNTRANSFER, 1);
                    
                
ARC2_StoreEndpoint.php https://github.com/drobbins/s3db.git | PHP | 716 lines
                    
1<?php
                    
2/*
                    
36    if (!$mthd || ($mthd == 'post')) {
                    
37      $r = @file_get_contents('php://input');
                    
38    }
                    
46      $qs = $this->getQueryString($mthd);
                    
47      if (preg_match_all('/\&' . $name . '=([^\&]*)/', $qs, $m)){
                    
48        foreach ($m[1] as $i => $val) {
                    
282      'json' => 'SPARQLJSON', 'sparql-results+json' => 'SPARQLJSON',
                    
283      'php_ser' => 'PHPSER', 'sql' => 'xxSQL', 'plain' => 'Plain', 'htmltab' => 'HTMLTable',
                    
284    );
                    
406  
                    
407  function getPHPSERSelectResultDoc($r) {
                    
408    $this->setHeader('content-type', 'Content-Type: text/plain');
                    
                
fulltext_native.php https://github.com/naderman/phpbb-orchestra.git | PHP | 1758 lines
                    
1<?php
                    
2/**
                    
5* @version $Id$
                    
6* @copyright (c) 2005 phpBB Group
                    
7* @license http://opensource.org/licenses/gpl-license.php GNU Public License
                    
13*/
                    
14if (!defined('IN_PHPBB'))
                    
15{
                    
21*/
                    
22include_once($phpbb_root_path . 'includes/search/search.' . $phpEx);
                    
23
                    
48	{
                    
49		global $phpbb_root_path, $phpEx, $config;
                    
50
                    
57		{
                    
58			include($phpbb_root_path . 'includes/utf/utf_normalizer.' . $phpEx);
                    
59		}
                    
                
fulltext_mysql.php https://github.com/naderman/phpbb-orchestra.git | PHP | 940 lines
                    
1<?php
                    
2/**
                    
5* @version $Id$
                    
6* @copyright (c) 2005 phpBB Group
                    
7* @license http://opensource.org/licenses/gpl-license.php GNU Public License
                    
13*/
                    
14if (!defined('IN_PHPBB'))
                    
15{
                    
21*/
                    
22include_once($phpbb_root_path . 'includes/search/search.' . $phpEx);
                    
23
                    
44
                    
45		if (version_compare(PHP_VERSION, '5.1.0', '>=') || (version_compare(PHP_VERSION, '5.0.0-dev', '<=') && version_compare(PHP_VERSION, '4.4.0', '>=')))
                    
46		{
                    
46		{
                    
47			// While this is the proper range of PHP versions, PHP may not be linked with the bundled PCRE lib and instead with an older version
                    
48			if (@preg_match('/\p{L}/u', 'a') !== false)
                    
                
oracle.php https://github.com/naderman/phpbb-orchestra.git | PHP | 771 lines
                    
1<?php
                    
2/**
                    
5* @version $Id$
                    
6* @copyright (c) 2005 phpBB Group
                    
7* @license http://opensource.org/licenses/gpl-license.php GNU Public License
                    
13*/
                    
14if (!defined('IN_PHPBB'))
                    
15{
                    
18
                    
19include_once($phpbb_root_path . 'includes/db/dbal.' . $phpEx);
                    
20
                    
146	{
                    
147		preg_match_all('/\s*(AND|OR)?\s*([\w_.()]++)\s*(?:(=|<[=>]?|>=?|LIKE)\s*((?>\'(?>[^\']++|\'\')*+\'|[\d-.()]+))|((NOT )?IN\s*\((?>\'(?>[^\']++|\'\')*+\',? ?|[\d-.]+,? ?)*+\)))/', $where_clause, $result, PREG_SET_ORDER);
                    
148		$out = '';
                    
174				$extra = false;
                    
175				preg_match_all('/\'(?>[^\']++|\'\')*+\'|[\d-.]++/', $sub_exp, $sub_vals, PREG_PATTERN_ORDER);
                    
176				$i = 0;
                    
                
functions_template.php https://github.com/naderman/phpbb-orchestra.git | PHP | 814 lines
                    
126		// Pull out all block/statement level elements and separate plain text
                    
127		preg_match_all('#<!-- PHP -->(.*?)<!-- ENDPHP -->#s', $code, $matches);
                    
128		$php_blocks = $matches[1];
                    
128		$php_blocks = $matches[1];
                    
129		$code = preg_replace('#<!-- PHP -->.*?<!-- ENDPHP -->#s', '<!-- PHP -->', $code);
                    
130
                    
231				case 'INCLUDEPHP':
                    
232					$compile_blocks[] = ($config['tpl_allow_php']) ? '<?php ' . $this->compile_tag_include_php(array_shift($includephp_blocks)) . ' ?>' : '';
                    
233				break;
                    
235				case 'PHP':
                    
236					$compile_blocks[] = ($config['tpl_allow_php']) ? '<?php ' . array_shift($php_blocks) . ' ?>' : '';
                    
237				break;
                    
254		// Remove unused opening/closing tags
                    
255		$template_php = str_replace(' ?><?php ', ' ', $template_php);
                    
256
                    
                
tcpdf_parser.php https://bitbucket.org/vsposato/vivo-tools.git | PHP | 501 lines
                    
1<?php
                    
2//============================================================+
                    
2//============================================================+
                    
3// File name   : tcpdf_parser.php
                    
4// Version     : 1.0.000
                    
30//
                    
31// Description : This is a PHP class for parsing PDF documents.
                    
32//
                    
36 * @file
                    
37 * This is a PHP class for parsing PDF documents.<br>
                    
38 * @package com.tecnick.tcpdf
                    
43// include class for decoding filters
                    
44require_once(dirname(__FILE__).'/tcpdf_filters.php');
                    
45
                    
47 * @class TCPDF_PARSER
                    
48 * This is a PHP class for parsing PDF documents.<br>
                    
49 * @package com.tecnick.tcpdf
                    
                
pop3.php https://github.com/lewellyn/TrellisDesk.git | PHP | 839 lines
                    
1<?php
                    
2
                    
53
                    
54require_once TD_INC . "trellis.php";
                    
55$trellis = new trellis(1);
                    
370
                    
371                if ( preg_match_all( '/Ticket ID #([0-9]+)/i', $email['subject'], $matches, PREG_PATTERN_ORDER ) )
                    
372                {
                    
                
commonsapi.php https://github.com/ChuguluGames/mediawiki-svn.git | PHP | 535 lines
                    
18$api_version = '0.9' ; // Version
                    
19$api_data_page_url = 'http://commons.wikimedia.org/w/index.php?title=MediaWiki:Commons_API&action=raw' ; // URL of license data page
                    
20
                    
105  $wiki = trim ( $wiki ) ;
                    
106  $url = "http://commons.wikimedia.org/w/api.php?format=php&action=parse&text=" . urlencode ( $wiki ) . "&title=" . urlencode ( $img ) ;
                    
107  $wiki = unserialize ( file_get_contents ( $url ) ) ;
                    
135  $matches = array () ;
                    
136  preg_match_all ( '/span\s+id="field-[^"]+"/' , $text , $matches ) ;
                    
137  $matches = $matches[0] ;
                    
228<ul>
                    
229<li><a href='commonsapi.php?image=Sa-warthog.jpg&thumbwidth=150&thumbheight=150&versions&meta'>Sa-warthog.jpg</a> with thumbnail, version, and meta information</li>
                    
230<li><a href='commonsapi.php?image=Yarra_Panorama.jpg&forcehtml'>Yarra_Panorama.jpg</a> (contains geocoding, which resolves to a <tt>&lt;location&gt;</tt> tag)</li>
                    
277// get file data via "normal" API
                    
278$ii_url = "http://commons.wikimedia.org/w/api.php?format=php&action=query&prop=imageinfo&iilimit=500&iiprop=timestamp|user|url|size|sha1|metadata&titles=Image:" . $img ;
                    
279if ( $thumb_width != 0 ) $ii_url .= '&iiurlwidth=' . $thumb_width ;
                    
                
GenericEditPage.php https://github.com/ChuguluGames/mediawiki-svn.git | PHP | 782 lines
                    
1<?php
                    
2/* vim: noet ts=4 sw=4
                    
16
                    
17$wgExtensionMessagesFiles['GenericEditPage'] = dirname( __FILE__ ) . '/GenericEditPage.i18n.php';
                    
18
                    
77	$re = "/\n*<layout\s+name=\"(.+)\"\s+\/>/";
                    
78	preg_match_all ( $re, $text, $matches );
                    
79	$text = preg_replace ( $re, "", $text );
                    
123			$section_num = count ( $layout ) - 1;
                    
124			preg_match_all ( $re, $value, $matches );
                    
125			foreach ( $matches[1] as $attribute )
                    
168	$regex = "/\[\[category:(.+?)(?:\|.*)?\]\]/i";
                    
169	preg_match_all ( $regex, strtolower( $text ), $matches );
                    
170	$text = preg_replace ( $regex, "", $text );
                    
                
WOM_Processor.php https://github.com/ChuguluGames/mediawiki-svn.git | PHP | 740 lines
                    
1<?php
                    
2/**
                    
103					// shall think of other language, e.g., Chinese
                    
104					$r = preg_match_all( '/(\n[^\n])|(([\.!?](([\'"]|\'{2,6})?))([ \t]))/',
                    
105						$text, $ms, PREG_SET_ORDER | PREG_OFFSET_CAPTURE );
                    
                
WCDate.php https://github.com/ChuguluGames/mediawiki-svn.git | PHP | 1119 lines
                    
1<?php
                    
2/**
                    
205		$options = implode( '|', array_merge( $adTerms, $bcTerms, $circaTerms ) );
                    
206		if ( !preg_match_all( '/'. $options . '|\p{N}+|\p{L}+|./uS', $date, $matches ) ) {
                    
207			$this->year           = 0;
                    
                
TranslatablePage.php https://github.com/ChuguluGames/mediawiki-svn.git | PHP | 749 lines
                    
1<?php
                    
2/**
                    
226			$matches = array();
                    
227			$ok = preg_match_all( $re, $text, $matches, PREG_OFFSET_CAPTURE );
                    
228
                    
366		$matches = array();
                    
367		$count = preg_match_all( $re, $content, $matches, PREG_SET_ORDER );
                    
368
                    
                
Gettext.php https://github.com/ChuguluGames/mediawiki-svn.git | PHP | 562 lines
                    
1<?php
                    
2/**
                    
30		$matches = array();
                    
31		preg_match_all( '/^#\s*Author:\s*(.*)$/m', $data, $matches );
                    
32		$authors = $matches[1];
                    
187			$matches = array();
                    
188			if ( preg_match_all( '/^#(.?) (.*)$/m', $section, $matches, PREG_SET_ORDER ) ) {
                    
189				foreach ( $matches as $match ) {
                    
326
                    
327		$output = <<<PHP
                    
328# Translation of {$this->group->getLabel()} to $name ($native)
                    
331$authors$extra
                    
332PHP;
                    
333
                    
                
SimpleSecurity_body.php https://github.com/ChuguluGames/mediawiki-svn.git | PHP | 466 lines
                    
1<?php
                    
2/**
                    
50			$groups = new Article( Title::newFromText( $wgSecurityGroupsArticle, NS_MEDIAWIKI ) );
                    
51			if ( preg_match_all( "/^\*?\s*(.+?)\s*(\|\s*(.+))?$/m", $groups->getContent(), $match ) ) {
                    
52				foreach( $match[1] as $i => $k ) {
                    
                
scrape_and_insert.inc.php https://github.com/ChuguluGames/mediawiki-svn.git | PHP | 927 lines
                    
1<?php
                    
2/*
                    
2/*
                    
3 * scrape_and_insert.inc.php Created on Feb 14, 2008
                    
4 *
                    
82			$patern = '/overlib\(\'(.*)\((Length: ([^\)]*)).*CAPTION,\'<font size=2>(.*)<((.*href="([^"]*))|.*)>/';
                    
83			preg_match_all( $patern, $rawpage, $matches );
                    
84			$cspan_person_ary = array();
                    
                
LocalisationUpdate.class.php https://github.com/ChuguluGames/mediawiki-svn.git | PHP | 670 lines
                    
74					$matches = array();
                    
75					if( preg_match( '/^(.*)\.i18n\.php$/', $filename, $matches ) ) {
                    
76						$group = $matches[1];
                    
153			// And save all the filenames of files containing messages
                    
154			if ( preg_match( '/Messages([A-Z][a-z_]+)\.php$/', $file, $m ) ) {
                    
155				if ( $m[1] != 'En' ) { // Except for the English one.
                    
162		// Find the changed English strings (as these messages won't be updated in ANY language).
                    
163		$changedEnglishStrings = self::compareFiles( $localdir . '/MessagesEn.php', $svndir . '/MessagesEn.php', $verbose );
                    
164
                    
194	public static function cleanupFile( $contents ) {
                    
195		// We don't need any PHP tags.
                    
196		$contents = strtr( $contents,
                    
231	public static function cleanupExtensionFile( $contents ) {
                    
232		// We don't want PHP tags.
                    
233		$contents = preg_replace( "/<\?php/", "", $contents );
                    
                
FCKeditor.body.php https://github.com/ChuguluGames/mediawiki-svn.git | PHP | 713 lines
                    
1<?php
                    
2/**
                    
66			/*
                    
67			If this site's LocalSettings.php defines Namespaces that shouldn't use the FCKEditor (in the #wgFCKexcludedNamespaces array), those excluded
                    
68			namespaces should be combined with those excluded in the user's preferences.
                    
132	public static function onSanitizerAfterFixTagAttributes( $text, $element, &$attribs ) {
                    
133		$text = preg_match_all( "/Fckmw\d+fckmw/", $text, $matches );
                    
134
                    
                
DPLforum_body.php https://github.com/ChuguluGames/mediawiki-svn.git | PHP | 540 lines
                    
1<?php
                    
2/**
                    
67		$cats = array();
                    
68		if ( preg_match_all( "/^\s*$name\s*=\s*(.*)/mi", $this->sInput, $matches ) ) {
                    
69			foreach ( $matches[1] as $cat ) {
                    
                
my.php https://bitbucket.org/johnroyer/phpwind8.7.git | PHP | 436 lines
                    
1<?php
                    
2!defined('A_P') && exit('Forbidden');
                    
7if($s) {//底部快捷
                    
8	require_once(R_P.'require/showimg.php');
                    
9	list($faceurl) = showfacedesign($winddb['icon'],1,'m');
                    
35	if ($db_tcheck ){
                    
36		require_once(R_P.'require/postfunc.php');
                    
37		$userInfo = $userService->get($winduid,false,true);
                    
40	}
                    
41	preg_match_all('/@([^\\&\'"\/\*,<>\r\t\n\s#%?@::]+)\s?/i', $atc_content, $matchs);
                    
42	if($matchs[1]){
                    
55	if ($ismessage) {
                    
56		require_once(A_P . 'weibo/require/sendmessage.php');
                    
57	}
                    
82	$weiboList = $weiboService->getUserWeibos($winduid,$page,$perpage);
                    
83	$pages = numofpage($count, $page, $pageCount, 'apps.php?q=weibo&do=my&', null, 'weiboList.my');
                    
84
                    
                
Form_validation.php https://gitlab.com/ricoru21/py_incidencia | PHP | 1382 lines
                    
1<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
                    
2/**
                    
4 *
                    
5 * An open source application development framework for PHP 5.1.6 or newer
                    
6 *
                    
114		// into its components so that we can fetch the corresponding POST data later
                    
115		if (strpos($field, '[') !== FALSE AND preg_match_all('/\[(.*?)\]/', $field, $matches))
                    
116		{
                    
117			// Note: Due to a bug in current() that affects some versions
                    
118			// of PHP we can not pass function call directly into it
                    
119			$x = explode('[', $field);
                    
                
compat.php https://gitlab.com/juanito.abelo/nlmobile | PHP | 580 lines
                    
2/**
                    
3 * WordPress implementation for PHP functions either missing from older PHP versions or not included by default.
                    
4 *
                    
180		// Use the regex unicode support to separate the UTF-8 characters into an array.
                    
181		preg_match_all( '/./us', $str, $match );
                    
182		return count( $match[0] );
                    
421	 *
                    
422	 * Compatibility shim for PHP <5.4
                    
423	 *
                    
423	 *
                    
424	 * @link https://secure.php.net/jsonserializable
                    
425	 *
                    
452	 *
                    
453	 * @see http://php.net/manual/en/function.array-replace-recursive.php#109390
                    
454	 *
                    
                
font-awesome.php https://gitlab.com/juanito.abelo/nlmobile | PHP | 634 lines
                    
1<?php
                    
2
                    
11//
                    
12//		preg_match_all($pattern, $subject, $matches, PREG_SET_ORDER);
                    
13//
                    
                
SharedPageUrls.php https://gitlab.com/juanito.abelo/nlmobile | PHP | 736 lines
                    
1<?php
                    
2
                    
117            $matches =array();
                    
118            if ($post && ($post_pages_number = preg_match_all('/\<\!\-\-nextpage\-\-\>/', $post->post_content,$matches))>0) {
                    
119                global $wp_rewrite;
                    
                
helpers.php https://gitlab.com/juanito.abelo/nlmobile | PHP | 1160 lines
                    
1<?php
                    
2/**
                    
56		if ( is_string( $thumb_size ) ) {
                    
57			preg_match_all( '/\d+/', $thumb_size, $thumb_matches );
                    
58			if ( isset( $thumb_matches[0] ) ) {
                    
365*
                    
366* php 5.2+
                    
367*
                    
369*
                    
370* <?php
                    
371* $thumb = get_post_thumbnail_id();
                    
373* ?>
                    
374* <img src="<?php echo $image[url]; ?>" width="<?php echo $image[width]; ?>" height="<?php echo $image[height]; ?>" />
                    
375*
                    
524 * identify and build design specially for VC shortcodes.
                    
525 * Used in wp-content/plugins/js_composer/include/classes/core/class-vc-base.php\Vc_Base\bodyClass
                    
526 *
                    
                
class-vc-base.php https://gitlab.com/juanito.abelo/nlmobile | PHP | 873 lines
                    
1<?php
                    
2/**
                    
96		if ( $this->post_admin === false ) {
                    
97			require_once vc_path_dir( 'CORE_DIR', 'class-vc-post-admin.php' );
                    
98			$this->post_admin = new Vc_Post_Admin();
                    
252	public function addShortCode( array $shortcode ) {
                    
253		require_once vc_path_dir( 'SHORTCODES_DIR', 'shortcodes.php' );
                    
254		$this->shortcodes[$shortcode['base']] = new WPBakeryShortCodeFishBones( $shortcode );
                    
386		}
                    
387		preg_match_all( '/' . get_shortcode_regex() . '/', $content, $shortcodes );
                    
388		foreach ( $shortcodes[2] as $index => $tag ) {
                    
485			delete_option( 'wpb_js_composer_do_activation_redirect' );
                    
486			wp_redirect( admin_url( 'options-general.php?page=vc_settings&build_css=1' ) );
                    
487		}
                    
                
class.photon.php https://gitlab.com/juanito.abelo/nlmobile | PHP | 619 lines
                    
1<?php
                    
2
                    
9
                    
10	// Allowed extensions must match http://code.trac.wordpress.org/browser/photon/index.php#L31
                    
11	protected static $extensions = array(
                    
41	 * Register actions and filters, but only if basic Photon functions are available.
                    
42	 * The basic functions are found in ./functions.photon.php.
                    
43	 *
                    
90
                    
91		if ( preg_match_all( '#(?:<a[^>]+?href=["|\'](?P<link_url>[^\s]+?)["|\'][^>]*?>\s*)?(?P<img_tag><img[^>]+?src=["|\'](?P<img_url>[^\s]+?)["|\'].*?>){1}(?:\s*</a>)?#is', $content, $images ) ) {
                    
92			foreach ( $images as $key => $unused ) {
                    
259					// Detect if image source is for a custom-cropped thumbnail and prevent further URL manipulation.
                    
260					if ( ! $fullsize_url && preg_match_all( '#-e[a-z0-9]+(-\d+x\d+)?\.(' . implode('|', self::$extensions ) . '){1}$#i', basename( $src ), $filename ) )
                    
261						$fullsize_url = true;
                    
                
class.media-extractor.php https://gitlab.com/juanito.abelo/nlmobile | PHP | 436 lines
                    
1<?php
                    
2/**
                    
97		if ( self::MENTIONS & $what_to_extract ) {
                    
98			if ( preg_match_all( '/(^|\s)@(\w+)/u', $stripped_content, $matches ) ) {
                    
99				$mentions = array_values( array_unique( $matches[2] ) ); //array_unique() retains the keys!
                    
109		/** Some hosts may not compile with --enable-unicode-properties and kick a warning:
                    
110		  *   Warning: preg_match_all() [function.preg-match-all]: Compilation failed: support for \P, \p, and \X has not been compiled
                    
111		  * Therefore, we only run this code block on wpcom, not in Jetpack.
                    
116			//   https://github.com/twitter/twitter-text/blob/master/java/src/com/twitter/Regex.java
                    
117			if ( preg_match_all( '/(?:^|\s)#(\w*\p{L}+\w*)/u', $stripped_content, $matches ) ) {
                    
118				$hashtags = array_values( array_unique( $matches[1] ) ); //array_unique() retains the keys!
                    
131		$shortcode_pattern = '/' . get_shortcode_regex() . '/s';
                    
132 		if ( preg_match_all( $shortcode_pattern, $content, $matches ) ) {
                    
133
                    
205			// (we treat embed links as just another link)
                    
206			if ( preg_match_all( '#(?:^|\s|"|\')(https?://([^\s()<>]+(?:\([\w\d]+\)|([^[:punct:]\s]|/))))#', $content, $matches ) ) {
                    
207
                    
                
class.jetpack-post-images.php https://gitlab.com/juanito.abelo/nlmobile | PHP | 505 lines
                    
1<?php
                    
2
                    
36		// Find all the slideshows
                    
37		preg_match_all( '/' . get_shortcode_regex() . '/sx', $post->post_content, $slideshow_matches, PREG_SET_ORDER );
                    
38
                    
103		// Find all the galleries
                    
104		preg_match_all( '/' . get_shortcode_regex() . '/s', $post->post_content, $gallery_matches, PREG_SET_ORDER );
                    
105
                    
112
                    
113			preg_match_all( '/<img\s+[^>]*src=([\'"])([^\'"]*)\\1/', $gallery, $image_match, PREG_PATTERN_ORDER | PREG_OFFSET_CAPTURE );
                    
114
                    
288
                    
289		preg_match_all( '!<img.*src=[\'"]([^"]+)[\'"].*/?>!iUs', $html, $matches );
                    
290		if ( !empty( $matches[1] ) ) {
                    
                
shortcodes.php https://gitlab.com/darmawan.fatria/df-skp-2014 | PHP | 557 lines
                    
1<?php
                    
2/**
                    
159	if ( shortcode_exists( $tag ) ) {
                    
160		preg_match_all( '/' . get_shortcode_regex() . '/s', $content, $matches, PREG_SET_ORDER );
                    
161		if ( empty( $matches ) )
                    
446	$text = preg_replace("/[\x{00a0}\x{200b}]+/u", " ", $text);
                    
447	if ( preg_match_all($pattern, $text, $match, PREG_SET_ORDER) ) {
                    
448		foreach ($match as $m) {
                    
                
class-wp-press-this.php https://gitlab.com/darmawan.fatria/df-skp-2014 | PHP | 1466 lines
                    
1<?php
                    
2/**
                    
67
                    
68		if ( preg_match_all( '/<img [^>]+>/', $content, $matches ) && current_user_can( 'upload_files' ) ) {
                    
69			foreach ( (array) $matches[0] as $image ) {
                    
                
cssmgr.php https://gitlab.com/Zinnurain/destination_finder_beta | PHP | 1226 lines
                    
1<?php
                    
2
                    
21function ReadCSS($html) {
                    
22	preg_match_all('/<style[^>]*media=["\']([^"\'>]*)["\'].*?<\/style>/is',$html,$m);
                    
23	for($i=0; $i<count($m[0]); $i++) {
                    
27	}
                    
28	preg_match_all('/<link[^>]*media=["\']([^"\'>]*)["\'].*?>/is',$html,$m);
                    
29	for($i=0; $i<count($m[0]); $i++) {
                    
40	preg_replace('/<\/style>/i', '</style>', $html);
                    
41	preg_match_all('/<style.*?>(.*?)<\/style>/si',$html,$m);
                    
42	if (count($m[1])) { 
                    
61	$regexp = '/<link[^>]*rel=["\']stylesheet["\'][^>]*href=["\']([^>"\']*)["\'].*?>/si';
                    
62	$x = preg_match_all($regexp,$html,$cxt);
                    
63	if ($x) { 
                    
67	$regexp = '/<link[^>]*href=["\']([^>"\']*)["\'][^>]*?rel=["\']stylesheet["\'].*?>/si';
                    
68	$x = preg_match_all($regexp,$html,$cxt);
                    
69	if ($x) { 
                    
                
class.VTP.php https://gitlab.com/vanthanhhoh/devlovebook | PHP | 496 lines
                    
61		$this->IsCache = $IsCache;
                    
62		$this->CompiledPHPCode = $TPLFileOrHtmlStringOrCompiledPHPCode;
                    
63		return $this;
                    
195					$PhpCompiled = ($echo ? 'echo ' : NULL) . (!empty($ExtraParams) ? "$FunctionName($VariableName,$ExtraParams)" : "$FunctionName($VariableName)");
                    
196					$PhpCompiled = '<?php ' . $PhpCompiled . ' ?>';
                    
197					$Code = str_replace($Tag['key'], $PhpCompiled, $Code);
                    
221				elseif($echo) {
                    
222					$PhpCompiled = '<?php ' . ($echo ? 'echo ' : NULL) . $this->VariableTrueForm('$' . $Value['Var']) . ' ?>';
                    
223				}
                    
241				if($echo) {
                    
242					$PhpCompiled = '<?php ' . ($echo ? 'echo ' : NULL) . $Value['Var'] . ' ?>';
                    
243				}
                    
259				if($echo)
                    
260					$PhpCompiled = '<?php ' . ($echo ? 'echo ' : NULL) . $this->VariableTrueForm('$' . $Value['Var']) . ' ?>';
                    
261				else
                    
                
class.VTE.php https://gitlab.com/vanthanhhoh/devlovebook | PHP | 596 lines
                    
60		$this->IsCache = $IsCache;
                    
61		$this->CompiledPHPCode = $CompiledPHPCode;
                    
62		return $this;
                    
239						$PhpCompiled = !empty($ExtraParams) ? "$InitializeVar $Math $FunctionName($VarOnly,$ExtraParams)" : "$InitializeVar $Math $FunctionName($VarOnly)";
                    
240						$PhpCompiled = '<?php ' . $PhpCompiled . ' ?>';
                    
241						$Code = str_replace($Tag['key'], $PhpCompiled, $Code);
                    
270						$PhpCompiled = ($echo ? 'echo ' : NULL) . $PhpCompiled;
                    
271						$PhpCompiled = '<?php ' . $PhpCompiled . ' ?>';
                    
272						$Code = str_replace($Tag['key'], $PhpCompiled, $Code);
                    
317				if($echo) {
                    
318					$PhpCompiled = '<?php ' . ($echo ? 'echo ' : NULL) . $Value['Var'] . ' ?>';
                    
319				}
                    
335				if($echo)
                    
336					$PhpCompiled = '<?php ' . ($echo ? 'echo ' : NULL) . $this->VariableTrueForm('$' . $Value['Var']) . ' ?>';
                    
337				else
                    
                
AutoLoader.class.php https://github.com/cj/Project-Pier.git | PHP | 300 lines
                    
1<?php
                    
2  
                    
28    */
                    
29    private $index_filename = 'autoloader_index.php';
                    
30    
                    
42    */
                    
43    private $scan_file_extension = 'class.php';
                    
44    
                    
116    * 	creates an associative array (class name => class file) 
                    
117    * - Generates the array in PHP code and saves it as index file
                    
118    *
                    
138    private function createIndexFile() {
                    
139      /* generate php index file */
                    
140      $index_content = "<?php\n";
                    
196    /**
                    
197    * Parse a file for PHP classes and add them to our classIndex
                    
198    *
                    
                
Parser.php https://github.com/mhoofman/wordpress-heroku.git | PHP | 441 lines
                    
1<?php
                    
2/**
                    
76		$upload_dir = wp_upload_dir();
                    
77		$upload_path = str_replace($this->getPlugin()->getHttpsUrl()->getPath(), $this->getPlugin()->getHttpUrl()->getPath(), parse_url($upload_dir['baseurl'], PHP_URL_PATH));
                    
78
                    
116		$upload_dir = wp_upload_dir();
                    
117		$upload_path = str_replace($this->getPlugin()->getHttpsUrl()->getPath(), $this->getPlugin()->getHttpUrl()->getPath(), parse_url($upload_dir['baseurl'], PHP_URL_PATH));
                    
118
                    
147			$url->setScheme('http');
                    
148			preg_match_all('/(' . str_replace('/', '\/', preg_quote($url->toString())) . '[^\'"]*)[\'"]?/im', $this->_html, $httpsMatches);
                    
149
                    
151			$url->setScheme('https');
                    
152			preg_match_all('/(' . str_replace('/', '\/', preg_quote($url->toString())) . '[^\'"]*)[\'"]?/im', $this->_html, $httpMatches);
                    
153
                    
173		if ( is_admin() ) {
                    
174			preg_match_all('/\<(script|link|img)[^>]+[\'"]((http|https):\/\/[^\'"]+)[\'"][^>]*>(<\/(script|link|img|input|embed|param|iframe)>\s*)?/im', $this->_html, $matches);
                    
175		} else {
                    
                
 

Source

Language