php
int preg_match_all ( string $pattern , string $subject [, array &$matches [, int $flags = PREG_PATTERN_ORDER [, int $offset = 0 ]]] )
- subject を検索し、 pattern に指定した正規表現にマッチした すべての文字列を、flags で指定した 順番で、matches に代入します。
- 正規表現にマッチすると、そのマッチした文字列の後から 検索が続行されます。
マルチバイト版
- mb_ereg_search_init / mb_ereg_search_regex 関数を使えばok
参考
WordNet
- provide funds complementary to; "The company matched the employees contributions"
- the score needed to win a match
- lighter consisting of a thin piece of wood or cardboard tipped with combustible chemical; ignites with friction; "he always carries matches to light his pipe"; "as long youve a lucifer to light your fag" (同)lucifer, friction match
- an exact duplicate; "when a match is found an entry is made in the notebook" (同)mate
- a burning piece of wood or cardboard; "if you drop a match in there the whole place will explode"
- a formal contest in which two or more persons or teams compete
- something that resembles or harmonizes with; "that tie makes a good match with your jacket"
- make correspond or harmonize; "Match my sweater" (同)fit
- be compatible, similar or consistent; coincide in their characteristics; "The two stories dont agree in many details"; "The handwriting checks with the signature on the check"; "The suspects fingerprints dont match those on the gun" (同)fit, correspond, check, jibe, gibe, tally, agree
- bring two objects, ideas, or people together; "This fact is coupled to the other one"; "Matchmaker, can you match my daughter with a nice young man?"; "The student was paired with a partner for collaboration on the project" (同)mate, couple, pair, twin
- be equal or harmonize; "The two pieces match"
- give or join in marriage
- sports equipment consisting of a piece of thick padding on the floor for gymnastic sports (同)gym mat
- mounting consisting of a border or background for a picture (同)matting
- a small pad of material that is used to protect surface from an object placed on it
- a thick flat pad used as a floor covering
- a mass that is densely tangled or interwoven; "a mat of weeds and grass"
- quantifier; used with either mass or count nouns to indicate the whole number or amount of or every one of a class; "we sat up all night"; "ate all the food"; "all men are mortal"; "all parties are welcome"
- completely given to or absorbed by; "became all attention"
PrepTutorEJDIC
- (1本の)『まっち』 / (昔の)火縄[銃]
- 《単数形で》(…に)『匹敵する相手』,(…の)好敵手《+『for』+『名』》 / 《単数形で》対[の一方],片われ,生き写し / 《単数形で》(…と)『よくつり合うもの』《+『for』+『名』》 / 『試合』,競技 / 《古》縁組,結婚;結婚相手 / (…で)…‘に'『匹敵する』,‘と'対等である《+『名』+『in』(『for』)+『名』》 / (…と)…‘を'対抗させる,試合させる《+『名』+『against』(『with』)+『名』》 / 〈物が〉…‘と'『調和する』,つり合う / 〈人が〉…‘に'調和するものを見つける / 《古》(…と)…‘を'結婚させる《+『名』+『to』(『with』)+『名』》 / (…と)『調和がとれている』,つり合う《+『up with』+『名』》
- (床などに敷く)『マット』,敷物,むしろ,畳 / (花びん・置き物などの)下敷き / (レスリング・体操用の)詰め物をした厚い敷物 / 《a ~》(毛・雑草などの)もつれ《+『of』+『名』》 / 〈床など〉‘に'マットを敷く,‘を'マットで覆う / …‘を'もつれさせる / もつれる
- (絵画・写真などの飾り縁にする)台紙,厚紙 / (加工した金属などの)つや消し[面] / つや消しの,表画がつやのない / 〈絵など〉‘に'台紙を付ける / 〈表面〉‘を'つや消しにする,曇らせる
- 《単数形,または数えられない名詞につけて》(ある一つのものについて,その)『全体の』,全…,…じゅう,…全体 / 《複数形につけて》(個々を一つにまとめて)『全部の』,すべての / 《複数形,または数えられない名詞につけて》(ある全体の中の)いずれの,およそどの,あらゆる / 《数えられない名詞につけて》できる限りの,最大の / 《単数扱い》(物事について)『全部』,全体,すべて / 《複数扱い》『全員』,みんな / いっさいの所有物,いっさいがっさい / 『すっかり』,『全く』,もっぱら / 《all the+比較級の形で》かえって,いっそう / どちらも,双方とも
UpToDate Contents
全文を閲覧するには購読必要です。 To read the full text you will need to subscribe.
Related Links
- Here is a way to match everything on the page, performing an action for each match as you go. I had used this idiom in other languages, where its use is customary, but in PHP it seems to be not quite as common. <?php function custom_preg_match_all ...
- PREG_OFFSET_CAPTURE このフラグを設定した場合、各マッチに対応する文字列のオフセットも返されます。 これにより、返り値は配列となり、配列の要素 0 はマッチした文字列、 要素 1 は subject における マッチした ...
- 返り値 preg_match() は、pattern が指定した subject にマッチした場合に 1 を返します。 マッチしなかった場合は 0、エラーが発生した場合は FALSE を返します。
★リンクテーブル★
[★]
PHP
マルチバイト文字の正規表現によるマッチをおこなう。
$body = '[[はは' . "\n" . 'はあは]] jfljfかs';
mb_ereg('^\[\[(.*?)\]\]', $body , $match );
正規表現のところはデリミタ不要なんですかね。つけると逆にうまくいかないから
- 関
- preg_match, preg_match_all
参考
- http://php.net/manual/ja/function.mb-ereg-match.php
[★]
- 調和する、一致させる、匹敵する、整合する、対応する、マッチする
- 関
- accord、accordance、agree、agreement、coincide、coincidence、comparable、compare、concert、concerted、concordance、concur、concurrent、conform、congruence、congruent、consensus、consistent、consonant、correspond、correspondence、corresponding、equal、equivalent、fit、harmonic、harmonization、harmonize、management、matching、parallel、reconcile、unanimous、unity
[★]
- 挙動確認
<?php
$rep_1 = "2";
if ( preg_match( "/^([0-9]+)/is", $rep_1 , $match_1 ) ) {
var_dump ($match_1); echo "
\n";
}
$rep_1 = "2A";
if ( preg_match( "/^([0-9]+)/is", $rep_1 , $match_1 ) ) {
var_dump ($match_1); echo "
\n";
}
$rep_1 = "2A縲。";
if ( preg_match( "/^([0-9]+)/is", $rep_1 , $match_1 ) ) {
var_dump ($match_1); echo "
\n";
}
$rep_1 = "12";
if ( preg_match( "/^([0-9]+)/is", $rep_1 , $match_1 ) ) {
var_dump ($match_1); echo "
\n";
}
$rep_1 = "12A";
if ( preg_match( "/^([0-9]+)/is", $rep_1 , $match_1 ) ) {
var_dump ($match_1); echo "
\n";
}
exit(0);
?>
[★]
- 関
- adjust、combination、combinatorial、conform、conformity、conjunction、fit、integrity、interrogation、match、pair
[★]
[★]