PHP 7.2.0 Release Candidate 4 Released

ereg

(PHP 4, PHP 5)

eregRegular expression match

Description

int ereg ( string $pattern , string $string [, array &$regs ] )

Searches a string for matches to the regular expression given in pattern in a case-sensitive way.

Warning

This function has been DEPRECATED as of PHP 5.3.0. Relying on this feature is highly discouraged.

Parameters

pattern

Case sensitive regular expression.

string

The input string.

regs

If matches are found for parenthesized substrings of pattern and the function is called with the third argument regs, the matches will be stored in the elements of the array regs.

$regs[1] will contain the substring which starts at the first left parenthesis; $regs[2] will contain the substring starting at the second, and so on. $regs[0] will contain a copy of the complete string matched.

Return Values

Returns the length of the matched string if a match for pattern was found in string, or FALSE if no matches were found or an error occurred.

If the optional parameter regs was not passed or the length of the matched string is 0, this function returns 1.

Changelog

Version$>

$> ect1 changelog" id="reExae">$>tion.ereg-parameters">

$ $-3966section pspanExae">$ #1eng. idexae">$ss="typ $-p://php.n tr valifollowi> wcodegsnipper>t (YYYY-MM-DD) conr valip> [1]iti t: tain a c $-p://php.n class="clearhpcoden code">$stristylettp:lor: #000000n $stristylettp:lor: #0000BBss=lt;?rhp
i $stristylettp:lor: #007700n if (type">i $stristylettp:lor: #0000BBss cla type">i $stristylettp:lor: #007700n (type">i $stristylettp:lor: #DD0000n "([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})"type">i $stristylettp:lor: #007700n , type">i $stristylettp:lor: #0000BBss$f='/type">i $stristylettp:lor: #007700n , type">i $stristylettp:lor: #0000BBss$.ew pe">i $stristylettp:lor: #007700n )) {
i $stristylettp:lor: #DD0000n "type">i $stristylettp:lor: #0000BBss$.ew pe">i $stristylettp:lor: #007700n [type">i $stristylettp:lor: #0000BBss3 pe">i $stristylettp:lor: #007700n ]type">i $stristylettp:lor: #DD0000n .type">i $stristylettp:lor: #0000BBss$.ew pe">i $stristylettp:lor: #007700n [type">i $stristylettp:lor: #0000BBss2 pe">i $stristylettp:lor: #007700n ]type">i $stristylettp:lor: #DD0000n .type">i $stristylettp:lor: #0000BBss$.ew pe">i $stristylettp:lor: #007700n [type">i $stristylettp:lor: #0000BBss1 pe">i $stristylettp:lor: #007700n ]type">i $stristylettp:lor: #DD0000n "type">i $stristylettp:lor: #007700n ;
i $stristylettp:lor: #DD0000n "Ifsecid f='/ 

t: type">i $stristylettp:lor: #0000BBss$f='/type">i $stristylettp:lor: #DD0000n "type">i $stristylettp:lor: #007700n ;
i $stristylettp:lor: #0000BBss?>type">i type">i tycode">
ta Action has beenthird egex.dex/a>eter"> ct=PHP&amtext.pcrishPCREdex/a> w passed or matissud>Thiass="par tansio Seeect=PHP&amclassist dif
reg.s="ep:/ve[2] tarng. pclas">strsh str()ssa"type">i,name">$u/dd> Perl-ame"ati

r

rng. i /b> if n.3.0.blockData<.er

u/drna hr ectrm> < . Edi> report.php?bugugs.p addta na h, ssa"type">ict1 changelog" id="redd> ef='/ibuual/Na hriv>. tat1 earfix"> va hr ect1 Vu58770">ct1 Edi 58770ug"> et/report.php?bugug"> va h=un/atom+xmlVa h up!oparameteu/drna hr-va hu">upation+problem& Vd58770">ct1 Edi 58770ug"> et/report.php?bugug"> va h="> /atom+xmlVa h "> !oparameteu/drna hr-va h< <"> ation+problem& ngelog" ss=ynnctioV58770"atom+xml60%ssikew pas...">ct1 <2n+problem&blem&b table/div>tro> wcrameteu/dr haem>tnamehis f, >ssa"tawcrametegenanchor" &rs">;ssa"tdiv>ngelog"deed.phom+xml2005-11-15 07:35 ngtro> >11 yeard> go, >ss placeholder

x"> Hame58770">c class="clearhpcoden code">$stri !DOC> Hd.ph
:
regs, the matche.ew . a"> s="varname">$regs[1] will contain the substrinrenthesis="varname">$regs[0]regss[0]name"><"parame>raan> at/tt><]iti sn'ttain/ul> ly
akhr pe">i tycode"> tat1 earfix"> va hr ect1 Vu63157">ct1 Edi 63157ug"> et/report.php?bugug"> va h=un/atom+xmlVa h up!oparameteu/drna hr-va hu">upation+problem& Vd63157">ct1 Edi 63157ug"> et/report.php?bugug"> va h="> /atom+xmlVa h "> !oparameteu/drna hr-va h< <"> ation+problem& ngelog" ss=ynnctioV63157"atom+xml100%ssikew pas...">ct1 <1n+problem&blem&b table/div>tro> wcrameteu/dr haem>pstitle (aat) gratioamehis f, >ssa"tawcrametegenanchor" t&rs">;ssa"tdiv>ngelog"deed.phom+xml2006-03-14 01:39 ngtro> >11 yeard> go, >ss placeholder

x"> Hame63157">c class="clearhpcoden code">$stri !DOC> I wanual/a mass s[0]cra/d="m> UK>]itiby s[0]pd>
Version Description
4.1.gn="middm patternf='/="parametexact/emt/tts mcheactuss=y"wav">regs asvar clasmtere> i'1] massvar clasmpara"> .nd oter">string i the