! regexp - php. , -
: http://on-line-teaching.com/php/regexp.htm
: . .
, , , php. php content php performer
-PHP - . , , , . - . .
- , . , , .
, , (, Microsoft Word) - . , - : , , - .
, ? , . , - (@) . - .
- . , : - . , .
- , . , , .
. . , - . :
// a // \x41 - 'A' \x09 -
- , :
ACZms
- "" , . , :
- . "" , . :
() | . . |
| | |
^ | |
$ | |
\n | ( 0x0A) |
\r | ( 0x0D) |
\t | ( 0x09) |
\xhh | 0xhh, \x42 'B' |
. | . . |
\d | (0-9) |
\D | ( 0-9) |
\s | ( ) |
\S | (, , \s) |
\w | "" (, . , ('_')) |
\W | , , \w |
. "d" - digit (), "s" - symbol (), "w" - word (). - "" .
" 1812, - 2009". :
\d\d\d\d - 1812 2009 \D - , \s - .
, , .. , :
[0-9] - ( , \d) [0,2,4,6,8] - [A-Za-z0-9] - ( ) .
, \d\d\d[0,2,4,6,8] 1812, 2009. " , 0,2,4,6 8".
.
- , , . "{}". : . :
{X}
- , .
\d{4}
" ".
- .
{X, Y} // {,Y} // {X,}
X - , Y - . :
\d{2,4}
" ". , . :
\w{3,} - . \d{,5} - , , .
, :
[ -- ]{1,3}
, (, "", "", "", "" ..)
-: "*" (), "+" () "?" (). , . , , ( ""), - ( "").
"*" " ", ..
\w*
, .
"+" , - . ..
\d+
, .
"?" . ..
\d?
, .
"*" "+" . , - . , " " :
\.+
" ", , "". "?" ( ), . "" , , . :
\.+?
"".
- . - , "" . , , :
i | case-insensitive, .. . |
m | , , , . , . '^' '$' . , . |
s | '.' . .. /.+/ , , . . |
U | " " . ( PHP) "U" "g", ("g" - "greedy", ""). |
. , .
[\.\-_A-Za-z0-9]+?@[\.\-A-Za-z0-9]+?[\ .A-Za-z0-9]{2,} | |
^\d{1,2}([-. /])\d{1,2}\1\d{2,4}$ | |
[\d]{4}\.[\d]{2} | |
(?:8|\+7)? ?\(?(\d{3})\)? ?(\d{3})[ -]?(\d{2})[ -]?(\d{2}) | |
/<tag>(.*)</tag>/Uis |
PHP , :
int preg_match (string pattern, string subject [, array matches]) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
, subject pattern. 1, , 0. - matches, - . <?php // $value = "abcde 12345 klmnop"; // $template = "/\w{5}/"; // $result = preg_match($template, $value, $matches); echo ": $result<br>"; print_r($matches); ?> -
: 1
Array ( [0] => abcde ) |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
int preg_match_all (string pattern, string subject, array matches [, int order]) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
, - matches . | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
mixed preg_replace (mixed pattern, mixed replacement, mixed subject [, int limit]) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
, preg_replace , . .
<?php $text = "\t\n\t\t \n \t \n\n\n "; echo "<b> :</b>\n$text\n\n"; $text = preg_replace("/(\n \s{2,})/"," ",$text); echo "<b> :</b>\n$text"; // , // ?>- : : |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
mixed preg_replace_callback (mixed pattern, mixed callback, mixed subject [, int limit]) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
. - , . | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
array preg_split (string pattern, string subject [, int limit [, int flags]]) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
explode() split(). Ÿ , , . .
<?php // $text = join('',file('my_text.txt')); // $words = preg_split("/\s+/s",$text); // print_r($words); ?>-
Array
(
[0] =>
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
array preg_grep (string pattern, array input) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
. , , , . |
, . - (, " "). , (, "PCRE" "RegEx Builder").
-
, !
-, godot,
|
||||||||||
: dress - hordes 1 4
|
||||||||||
,
|
||||||||||
,
|
||||||||||
, , 2020 - ,
|
||||||||||
, , , .
|
||||||||||
|
||||||||||
|
||||||||||
|
||||||||||
|
||||||||||
|
||||||||||
(3), (1)
|
||||||||||
|
||||||||||
|
||||||||||
|
||||||||||
(3), (1)
|
||||||||||
|
||||||||||
,
|
||||||||||
|
||||||||||
|
||||||||||
,
|
||||||||||
,
|
||||||||||
,
|
||||||||||
, ,
|
||||||||||
, ,
|
||||||||||
, , cms,
|
||||||||||
,
|
||||||||||
, , ria xxl , fly snow 3d , . -
|
||||||||||
fle game engine -
|
||||||||||
- / megainformatic cms express files -
|
||||||||||
Flash, Flash - .
|
||||||||||
(multi lang), , . - (megainformatic cms social), megainformatic cms groupon, keywords gen + , .
megainformatic.ru/webjob/ - - |
||||||||||
megainformatic.ru/webjob/ - - |
||||||||||
,
megainformatic cms admin - |
||||||||||
|
||||||||||
|
||||||||||
megainformatic cms free - Photoshop
, Adobe Photoshop. , - GIMP, Corel Photo Paint .
|
||||||||||
2d 3d, , !
. , , !!! ( , ! ). |
||||||||||
, : -
- , , , . - - : - |
||||||||||
, 3ds max, photoshop, c++, directx, delphi php.
, . . |
||||||||||
Photoshop free, delphi directx - , !, mp3 - , megainformatic cms express - php + my sql. |
||||||||||
,
, delphi directx 8.1 ( 3d ), 3d studio max, - Fruity Loops Studio |
||||||||||
|