亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

??? ?? ? ??

?? ???? ???? ??? ??????

???? ?? ? ??? ??? ????? ?? ?? ??? ???? ??? ???? ???? ???. ? ??? ?? ???? ?? ??? ?? ? ??? ??? ???? ? ??? ? ??? ???? ???? ??? ???? ?? ??? ??? ?????? ???? ?????.

???? ???? ??? ??? ? ????.

1. ??? ?? ??? ??????.
?? ?? ?? ???? ????? ???? ???? ???? ?? ??? ??? ?? ????? ??? ? ????. ?? ??? ??? ???? ???.

2. ???? ?????.
?? ???? ???? ??? ?? ???? ?????, ?? ???? ??? ?????, ?? ???? ?? ? ????.

3. ?? ??? ???? ????? ?? ???? ?????.
??? ??? ??? ?? ???? ?? ? ????.

?? ?? ?? ???? ????, ??? ??? ????, ?? HTML ?? ??? ???? ? ?? ????. ? ?? ???? ???? ? ?? ?? HTML ?? ??? ? ??? ????? ??? ??? ? ????. ? ????? ??? ?? ?? ??? ????? ???? ?? ??? ??? ??? ??? ????. ?? ?? ???? ???? ??? ??? ??? ? ????. ????? ???? ???? ??? ???? ?? ? ????.

??? - ??

???(???)? ??? ?? ??? ?????. ? ??? ???? ?? ?? ???? ???? ??? ???? ???? ?? ???? ??? ???? ? ??? ? ????. ??? ??? ?? ??? ???? ?? ???? ?????.

????? ??? ? dir *.txt ?? ls *.txt? *.txt? ???? ????. ??? *? ??? ???? *? ??? ?????.

???? ???? ?? ?? ???? ??? ?? ????. ?, ?? ???? ?? ???? ??? ?? ??? ???? ???? ? ? ???? ?? ? ????. ???? ?? ??? ?? ??, ?? ??, ?? ??, ?? ? ?? ?? ?? ??? ?? ?? ??? ??? ? ????.

?? ???? ?? ??(?: a~z ??)? ?? ??('?? ??'?? ?)? ??? ??? ?????. ??? ???? ??? ? ???? ?? ??? ???? ?????. ???? ??? ???? ?? ??? ????? ??? ??? ???.

?? ??

?? ???? ?? ??? ????? ???? ?? ?? ??? ??? ?? ???? ??? ?? ?????. ???? ?? ???? ???, ?? ??, ?? ??? ? ?? ?? ??? ?????.

???? ?? ??

???? ?? ??? ???? ??? ? ? ????. ?? ??? ??? ? ?? ??? ???? ????? ???? ?????? ????.

?? ??

cx ?? x ??? ?? ??. ?? ??, cM? Control-M ?? ??? ?? ??? ?????. x ?? A-Z ?? a-z ? ???? ???. ??? ??? c? ??? 'c' ??? ?????.

f? ? ??? ?????. x0c ? cL? ?????.

n? ?? ??? ?????. x0a ? cJ? ?????.

r? ??? ?? ??? ?????. x0d ? cM? ?????.

s? ??, ?, ? ?? ?? ??? ?? ?? ??? ?????. [fnrtv]? ?????.

S? ??? ?? ?? ??? ?????. [^ fnrtv]? ?????.

? ??? ???? ????. x09 ? cI? ?????.

v? ?? ? ??? ?????. x0b ? cK? ?????.

????

?? ????? ??? ??? "*.txt"? *? ?? ??? ??? ?? ?????. , ??? ??? ?? ???? ??? ?????. ?? ??? *? ?? ??? ???? *? ????? ???? ???. ?, ?? *? ???? ???. ls*.txt.

?? ????? ?????? ??? ??? ?????. ??? ?? ??? ?????? ?? ??? "?????"?? ???. ?, ?? ?? ???? ??()? ?? ???. ?? ??? ???? ?? ??? ???? ????.

?? ?? ??

$ ?? ??? ?????. ???? ? ??. RegExp ??? Multiline ??? ??? ?? $? 'n' ?? 'r'?? ?????. $ ?? ??? ?????? $? ??????.

( ) ?? ???? ??? ?? ?????. ??? ???? ?? ?? ???? ?? ? ????. ??? ??? ?????? ( ? )? ??????.

* ?? ?? ???? 0? ?? ?????. * ??? ?????? *? ??????.

+ ?? ?? ???? ? ? ?? ?????. + ??? ?????? +? ??????.

. ?? ?? n? ??? ?? ?? ??? ?????. .? ?????? .? ??????.

[ ??? ???? ??? ?????. [? ?????? [? ??????.

? ?? ?? ???? 0 ?? 1? ?????? ????? ?? ???? ?????. ? ??? ?????? ?? ??????.

?? ??? ?? ??, ??? ??, ??? ?? 8?? ????? ??? ?????. ?? ?? 'n'? ?? 'n'? ?????. 'n'? ?? ??? ?????. ??? '\'? ""? ???? '('? "("? ?????.

^? ??? ???? ???? ?? ? ?? ???? ??? ?????. ? ?? ??? ??? ????. ???? ?? ??????. ^ ??? ?????? |? ?????.

???? ??? ????. ???? ?? ?? ??? ??? ????? ? ? ???? ??? ???? ? ?????. ??? ????? *, +, ?, {n}, {n,} ?? {n, m}. ??>

??

??

* ?? ?? ???? 0? ?? ?????. ?? ?? zo*? "z? ??? ? ????. ". ? "zoo". * {0,}? ?????.

+? ?? ?? ???? ? ? ?? ?????. ?? ?? 'zo+'? "zo" ? " Zoo? ?????. ", ??? "z"? ??? ? ????. + {1,}? ?????. ? ?? ?? ???? 0 ?? 1? ?????. ?? ?? "do(es)?"? "do " ?? "do"? ?????. "does"??.? {n} n? ??? ?? ?????. ?? ?? 'o{2}'? '? ??? ? ????. 'Bob'??? o'? ????? 'food'??? ? ?? o? ???? ? ????
.

{n,} n? ?? ?? ?????. n? ?? ?????. ?? ?? 'o{2,}'? "Bob"? 'o'? ???? ??? "foooood"? ?? o? ?????. 'o{1,}'? 'o+'? ?????. 'o{0,}'? 'o*'? ?????. ?

{n,m} m? n? ?? ??? ?? ?????. ??? n <= m???. ?? n?, ?? m? ?????. ?? ??, "o{1,3}"? "fooooood"? ?? ? ?? o? ?????. 'o{0,1}'? 'o?'? ?????. ??? ? ?? ???? ??? ???? ? ???.

? ?? ????? ? ?? 9?? ??? ???? ???? ? ?? ?? ? ??? ? ??? ???? ??? ?????. ???? ? ??? ?????. ?? ???? ???? ???? ? ??? ?????.

/Chapter [1-9][0-9]*/

???? ?? ??? ?? ?????. ??? ?? ?? ??? ?????. ? ?? 0?? 9??? ??? ?????.

???? ? ?? ?? ??? ??? ??? ? ??? ?? ??? + ???? ???? ????. ??? ????? ? ??? ? ??? ???? ?????. ? ?? ?? ?? ??? ?? ??? ???? ???.

? ??? 99??? ???? ??? ?? ?? ?? ?? ?? ???? ???? ?? 1??, ?? 2??? ??? ? ????.

/Chapter [0-9]{1,2}/

? ???? ??? ??? ??? ? ? ??? ????? ????. 99?? ?? ? ?????. ? ?? ??? ?? 0? ????? ????. ? ?? ??? ????? ? ?? ??? ??? ????:

/Chapter [1-9][0-9]?/

??

/Chapter [1-9][0-9]{0,1}/

*, + ? ? ???? ?? ??????. ?? ?? ?? ???? ??? ? ?? ??? ????? ??? ??? ???? ??? ?? ? ????.

?? ?? HTML ???? H1 ??? ?? ? ??? ??? ? ????. ??? ???? ??? ????.

<H1>1? – ??? ??</H1>

?? ???? Everything? ?????. ?? ?? ? ??(<)?? ?? H1 ??? ?? ? ??(>)?????.

/<.*>/

?? H1 ??? ????? ?? "non-greedy" ???? ?????. <H1>

/<.*?>/

*, + ?? ?? ?? ???? ??? "greedy"?? "greedy"? ?????. ? ??? ???? "????? ??" ??? ?? ?? ??? ?????.

?? ??

????? ???? ???? ?? ???? ? ??? ??? ? ????. ?? ?? ?, ?? ?? ?? ?? ?? ? ??? ???? ???? ??? ?? ????.

?? ???? ????? ??? ??? ???? ? ????, ^? $? ?? ???? ??? ?? ????, b? ??? ??? ? ??? ????, B? ??? ??.

?? ???? ???? ??? ????:

?? ??

^ ??? ?? ?? ???? ?? ?????. RegExp ??? Multiline ??? ??? ?? ^? n ?? r ??? ???? ?????.

$ ?? ???? ?? ?????. RegExp ??? Multiline ??? ??? ?? $? n ?? r ?? ???? ?????.

b ?? ??, ? ??? ?? ??? ??? ?????.

B ??? ?? ??.

??: ???? ?? ???? ?? ??? ? ????. ?? ?? ?? ?? ?? ??? ??? ? ? ??? ??? ?? ? ???? ^*? ?? ??? ???? ????.

??? ? ?? ??? ???? ?????? ?? ??? ?? ??? ^ ??? ?????. ^? ??? ??? ??? ??? ??? ???? ????.

??? ? ?? ???? ?????? ?? ??? ?? $ ??? ?????.

? ??? ??? ? ???? ???? ?? ?? ?? ???? ?? ?? ? ?? ???? ? ?? ??? ???? ? ??? ?????.

/^ ? [1-9][0-9]{0,1}/

?? ? ??? ?? ?? ??? ??? ?? ??? ??? ????? ???. ?? ???? ????. ?? ?? ??? ?? ?? ? ??? ?? ?????. ?? ???? ??? ?? ??? ?? ??? ?? ??? ????? ?????. ??? ?? ??? ?? ???? ???? ??? ?? ??? ? ????.

/^Chapter [1-9][0-9]{0,1}$/

?? ?? ??? ?? ???? ??? ?????. ???? ??? ??? ?????. ?? ??? ??? ?? ??? ?????. ??? ?? ??? ?? ?????. ?? ???? ?? ?? ?? ? ??? ???? ??? Chapter?? ??? ?? ? ??? ?????.

/bCha/

b ?? ??? ??? ????. ?? ?????. ??? ???? ?? ??? ?? ?? ??? ?? ???? ?? ??? ????. ??? ?? ??? ?? ??? ???? ??? ????. ?? ??, ?? ???? Chapter?? ??? ??? ter? ?? ?? ?? ???? ??? ?????.

/terb/

?? ??? Chapter? ??? apt? ????? aptitude? ??? apt?? ???? ????:

/Bapt/

??? apt? Chapter?? ????? ??? ?? ??? ????? aptitude?? ????? ?? ??? ?????. B ??? ?? ???? ?? ?? ??? ??? ???? ??? ???? ???? ??? ???? ????.

??

?? ?? ??? ??? ??, ??? ?? ??? |? ?????. ??? ??? ???? ???? ?????. ?, ?? ?? ??? ?????. ? ?? ? ?? ?? ?? ?:? ???? ? ???? ??? ? ????.

? ? ?:? ??? ?? ? ????, ??? ? ??? ??? ?= ? ?!???. ? ? ??? ? ?? ??? ????. ?? ?? ?? ???? ?? ?? ??? ??? ?? ???? ?????. ?? ??? ??? ???? ?? ??? ?? ???? ?? ???? ???? ?? ?????.

???

?? ??? ???? ??? ?? ??? ??? ???? ?? ?? ??? ?? ??? ?????. ??? ? ?? ??? ??? ??? ???? ???? ???? ????? ?????. ?? ??? 1?? ???? ?? 99?? ??? ?? ???? ??? ? ????. ? ??? 'n'? ???? ???? ? ????. ??? n? ?? ??? ???? ? ?? ?? ? ?? ??????.

??? ???? '?:', '?=' ?? '?!'? ???? ??? ???? ? ??? ?? ?? ?? ??? ?????.

???? ?? ???? ??? ?? ???? ? ??? ????? ??? ? ?? ??? ??? ?? ??? ?? ?????. ?? ??? ?? ?? ?????.

??? ??? ??????

? ???? ??? ?? ??? ?????. ? ??? ??? ?? ?? ?? ? ??? ?? ??? ???? ?? ?? ????. ?? ?? ???? ?? ?? ???? ???? ?? ?????.

/b([a-z]+) 1b/gi

??? ??? ??? ?? [a-z]+?, ?? ??? ??? ?????. ?? ???? ? ?? ??? ??? ??? ?? ??? ?? ?????. ?, ??? ???? ??? ???? ??? ? ?? ?????. 1? ? ?? ?? ??? ?????. ?? ?? ?? ??? ?? ??? ????? ???. ??? ??? "???" ?? "???"? ?? ??? ? ???? ???? ???? ????.

?? ??? ?? ?? ??(g)? ?? ????? ?? ? ?? ?? ?? ??? ???? ????? ?????. ??? ?? ?? ????? ???? ??(i) ??? ????? ???? ??? ?????. ?? ? ??? ?? ??? ???? ??? ? ?? ??? ?? ??? ?????.

?? ???? URI(Universal Resource Indicator)? ?? ?? ??? ?????. ?? URI? ????(ftp, http ?), ??? ?? ? ???/??? ??? ??? ??? ?????.

http://www.w3cschool.cc:80/html/html-tutorial .html

?? ???? ? ??? ?????.

/(w+)://([^/:]+)(:d*)?([^# ]*)/

? ??? ??? ?? ???? ? ??? ???? ??? ?????. ? ?? ???? ?? ??? ? ?? ???? ?? ?? ??? ?????. ? ?? ?? ?? ???? ??? ??? ?? ??? ?????. ?? ???? / ? :? ??? ?? ??? ??? ?????. ? ?? ?? ?? ???? ?? ??(??? ??)? ?????. ? ?? ???? ?? ??? ?? 0? ??? ??? ?????. ? ?? ???? ? ?? ??? ? ????. ????? ? ?? ??? ?? ???? ? ??? ??? ?? ?/?? ??? ??? ?????. ? ?? ???? # ?? ?? ??? ???? ?? ?? ?? ???? ?????.

?? URI? ?? ???? ???? ? ?? ???? ??? ?????.

1) ???? ?? ? ?? ?? ????? "http"? ?????.

2) ? ?? ??? ?? ????? ??? ?????. "www.w3cschool.cc"

3) ? ?? ??? ?? ????? ":80"? ?????.

4) ? ?? ??? ?? ????? "../html/html-tutorial.html? ?????. "

atoms

Atom? ????? ?? ?? ?????. ????? ??? Atom? ???? ???. ??. ??? ?? ????? ?? ??? ??? ????? ???.

??: ??? ?? ??, ??? ??, ? ??, 0-9, A-Za-z, ???, ??? ? ?? ??? ?? ?????.

??? ??? ???? ?? ?? preg_match ??? ???????.

int preg_match ( string $regular, string $string[, array &$result] )

??: $regular ??? ???? $string ??? ??????. ???? ?? ?? ?? ?? ???? ??? ??? $result ??? ????. ??? ??? 0? ?????.

?? ? ?

^? ??? ????, $? ?? ?????

??? ??

$str = 'date20150121';

if (preg_match(' /^)? ???? ?? ??? ??? ? ????. date/', $str)) {
echo '?? ??';
} else {
echo '?? ??';
}

w?? ??? ?? , ?? ?? ?? ??

d?

$str = 'date20150121'? ???? ??(D? ??? ?? ??? ???)? ?????. ??>

if (preg_match('/^w/', $str, $matches)) {
print_r($matches);
} else {
echo '?? ??';
}

??? ??? ??

Atom ??

d ?? 0-9

D 0-9? ??? ?? ??

w a-zA-Z0-9_

W 0-9A? ??? ?? ?? - ?? ?? Except -Za-z_

s ?? ?? ??? ?? n t r ??

S ??? ?? ?? ??? ??

[ ] ?? ?? ??

?:

d? 0-9? ?????

<?php
$zz = '/\d/';
$string = '我愛喝9你愛不愛喝';
if(preg_match($zz, $string, $matches)){
    echo '匹配到了,結果為:';
    var_dump($matches);
}else{
    echo '沒有匹配到';
}
?>

D? 0~9 ??? ?? ?????.

<?php
$zz = '/\D/';
$string = '121243中23453453';
if(preg_match($zz, $string, $matches)){
    echo '匹配到了,結果為:';
    var_dump($matches);
}else{
    echo '沒有匹配到';
}
?>

????? ??? ?????. 0~9 ??? ??? ??? ?????.

w? a-zA-Z0-9_

<?php
$zz = '/\w/';
$string = '新中_國萬歲呀萬歲';
if(preg_match($zz, $string, $matches)){
    echo '匹配到了,結果為:';
    var_dump($matches);
}else{
    echo '沒有匹配到';
}
?>
? ?????

??? ????? ??? ?????.

W? a-zA-Z0-9_

<?php
$zz = '/\w/';
$string = 'afasABCWEQR44231284737';
if(preg_match($zz, $string, $matches)){
    echo '匹配到了,結果為:';
    var_dump($matches);
}else{
    echo '沒有匹配到';
}
?>

? ???? ?????. ???? ?? ??? ?? a-zA-Z0-9_??, a-zA-Z0-9_? ?? ?? ?? ?????.

s? ?? ?? ?? n t r ??? ?????.

<?php
$zz = '/\s/';
$string = "中國萬
歲";
if(preg_match($zz, $string, $matches)){
    echo '匹配到了,結果為:';
    var_dump($matches);
}else{
    echo '沒有匹配到';
}
?>

? ??? ??? ???? ????? ?????.

S?? ?? ?? ?? ??

<?php
$zz = '/\s/';
$string = "        
          a       ";
if(preg_match($zz, $string, $matches)){
    echo '匹配到了,結果為:';
    var_dump($matches);
}else{
    echo '沒有匹配到';
}
?>

? ????? ?????. ??? ???? ??? ?? ? ????? ?????. ??? ??? ?? ?? a? ????. ??? ??? ?????.

[] ??? ??? Atoms

<?php
$zz = '/[0-5]\w+/';
$string = '6a';
$string1 = '1C';
if(preg_match($zz, $string, $matches)){
    echo '匹配到了,結果為:';
    var_dump($matches);
}else{
    echo '沒有匹配到';
}
?>

??:
?? ??? 0~5? $string? ???? ???? $string1? ??????. ???? $string? ? ?? ?? 6?? ?? [0-5] ??? ??? ????.

<?php
$zz = '/[a-zA-Z0-9_]\w/';
$string = 'ab';
$string1 = '9A';
if(preg_match($zz, $string, $matches)){
    echo '匹配到了,結果為:';
    var_dump($matches);
}else{
    echo '沒有匹配到';
}
?>

??:

$string? $string1? ?? ????? ?????. w? [a-zA-Z0-9_]

<?php
$zz = '/[abc]\d+/';
$string = 'a9';
$string1 = 'b1';
$string2 = 'c5';
$string3 = 'd4';
if(preg_match($zz, $string, $matches)){
    echo '匹配到了,結果為:';
    var_dump($matches);
}else{
    echo '沒有匹配到';
}
?>

??:

$string, $string1, $string2? ????? ????? $string3? ??????. $string3? [abc]? ??? ????? d?? ?????.

[^ ??]? ??? ??? ??? ???? ????.

<?php
$zz = '/[^0-9A-Za-z_]/';
$string = 'aaaaab311dd';
$string1 = '!$@!#%$#^##';
if(preg_match($zz, $string, $matches)){
    echo '匹配到了,結果為:';
    var_dump($matches);
}else{
    echo '沒有匹配到';
}
?>

??:

1) $string ????? ?????, $string1 ????? ??????. ??? ?? ?? ??? ?? ?????.

2) ^ ??? ?? ?? ??? ??? ??? ?? ??? ???? ????.






???? ??
||
<?php $zz = '/wq/'; $string = 'ssssswqaaaaaa'; if(preg_match($zz, $string, $matches)){ echo '匹配到了,結果為:'; var_dump($matches); }else{ echo '沒有匹配到'; } ?>