PHP
マルチバイト文字の正規表現によるマッチをおこなう。
$body = '[[はは' . "\n" . 'はあは]] jfljfかs';
mb_ereg('^\[\[(.*?)\]\]', $body , $match );
正規表現のところはデリミタ不要なんですかね。つけると逆にうまくいかないから
- 関
- preg_match, preg_match_all
参考
- http://php.net/manual/ja/function.mb-ereg-match.php
PrepTutorEJDIC
- …の前に / …する前に,しないうちに(before)
- え‐,あの‐
UpToDate Contents
全文を閲覧するには購読必要です。 To read the full text you will need to subscribe.
English Journal
- Epiregulin gene expression as a biomarker of benefit from cetuximab in the treatment of advanced colorectal cancer.
- Jonker DJ1, Karapetis CS2, Harbison C3, O'Callaghan CJ4, Tu D4, Simes RJ5, Malone DP3, Langer C6, Tebbutt N7, Price TJ8, Shapiro J9, Siu LL10, Wong RP11, Bjarnason G12, Moore MJ10, Zalcberg JR13, Khambata-Ford S3.
- British journal of cancer.Br J Cancer.2014 Feb 4;110(3):648-55. doi: 10.1038/bjc.2013.753. Epub 2013 Dec 12.
- BACKGROUND: Anti-EGFR antibody, cetuximab, improves overall survival (OS) in K-ras wild-type chemotherapy-refractory colorectal cancer. Epidermal growth factor receptor ligand epiregulin (EREG) gene expression may further predict cetuximab benefit.METHODS: Tumour samples from a phase III clinical tr
- PMID 24335920
- A 24.2-Mb deletion of 4q12 --> q21.21 characterized by array CGH in a 131/2-year-old girl with short stature, mental retardation, developmental delay, hyperopia, exotropia, enamel defects, delayed tooth eruption and delayed puberty.
- Chen CP1, Lin SP, Su YN, Chern SR, Tsai FJ, Wu PC, Chen LF, Wang W.
- Genetic counseling (Geneva, Switzerland).Genet Couns.2011;22(3):255-61.
- We report molecular and cytogenetic characterization of proximal deletion of chromosome 4q, del(4)(q12 --> q21.21) in a 131/2-year-old girl with short stature, mental retardation, developmental delay, hyperopia, exotropia, enamel defects, delayed tooth eruption and delayed puberty. We speculate t
- PMID 22029166
Related Links
- 返り値. マルチバイト対応の正規表現マッチを行い、 一致した場合は 1 を返します。 オプションの 3 番目の引数を 指定した場合は、一致した部分のバイト数を返し、一致 した部分文字列が 配列 regs に格納されます。空文字に 一致した場合は 1 が返され ます。
- パラメータ. pattern. 正規表現パターン。 マルチバイト文字を pattern で使用することが できます。 replacement. 置換文字列。 string. 調べたい文字列。 option: option パラメータで、マッチングの動作を変更可能です。 i を指定した場合、大文字・小文字が 区別 ...
★リンクテーブル★
[★]
string mb_ereg_replace ( string $pattern , string $replacement , string $string [, string $option = "msr" ] )
string から pattern にマッチする文字列を探し、 見つかった文字列を replacement で置換します。
例1
$str= "dasfds\n\n\n\n\n\n";
$str = mb_ereg_replace("\n+$","\n",$str);
echo $str . "■";
例2
$work = mb_ereg_replace( "[ ]" , "" , $work , "m" );
参考
- http://php.net/manual/ja/function.mb-ereg-replace.php
[★]
ミオグロビン myoglobin