.\" Copyright (C), 1995, Graeme W. Wilford. (Wilf.) .\" .\" Japanese Version Copyright (c) 1997 HIROFUMI Nishizuka .\" all rights reserved. .\" Translated Thu Dec 18 15:06:31 JST 1997 .\" by HIROFUMI Nishizuka .\" .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one. .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" .\" Wed Jun 14 16:10:28 BST 1995 Wilf. (G.Wilford@@ee.surrey.ac.uk) .\" .TH RE_COMP 3 1995-07-14 "GNU" "Linux Programmer's Manual" .SH 名前 re_comp, re_exec \- BSD の正規表現関数 .SH 書式 .B #define _REGEX_RE_COMP .br .B #include .br .B #include .sp .BI "char *re_comp(char *" regex ); .sp .BI "int re_exec(char *" string ); .SH 説明 .BR re_comp () は、 .I regex で示される NULL で終端された正規表現をコンパイルするために使用される。 コンパイルされたパターンは静的な領域を使用しており、そのパターンバッファ は以降の .BR re_comp () の使用によって上書きされる。 もし .I regex が NULL ならば何の操作も行われず、パターンバッファの内容は 置き換えられない。 .BR re_exec () は、 .I string が指す NULL で終端された文字列が前回コンパイルされた .I regex にマッチするかどうかを評価するために使用される。 .SH 返り値 .BR re_comp () は、 .I regex のコンパイルに成功した場合 NULL を返し、 それ以外の場合は適切なエラーメッセージへのポインタを返す。 .BR re_exec () は、一致した場合 1 を、失敗した場合 0 を返す。 .SH 準拠 4.3BSD. .SH 注意 これらの関数は廃止予定である。代わりに .BR regcomp (3) に書かれている関数を使用すべきである。 .SH 関連項目 .BR regcomp (3), .BR regex (7), GNU regex manual