?? regex.3
字號:
.\" SCCSID: @(#)regex.3 8.1 9/11/90.TH regex 3.SH Namere_comp, re_exec \- regular expression handler.SH Syntax.B char *re_comp(s).br.B char *s;.PP.B re_exec(s).br.B char *s;.SH DescriptionThe.NXR "regex keyword".NXR "re_comp subroutine".NXR "re_exec subroutine".NXR "regular expression handler".PN re_compsubroutinecompiles a string into an internal form suitable for pattern matching. The.PN re_exec subroutinechecks the argument string against the last string passed to.PN re_comp ..PPThe.PN re_compsubroutinereturns 0 if the string.I swas compiled successfully; otherwise a string containing anerror message is returned. If .PN re_compis passed 0 or a null string, it returns without changing the currentlycompiled regular expression..PPThe.PN re_execsubroutine returns 1 if the string.I smatches the last compiled regular expression, 0 if the string.I sfailed to match the last compiledregular expression, and \-1 if the compiledregular expression was invalid (indicating an internal error)..PPThe strings passed to both.PN re_compand.PN re_execmay have trailing or embedded newline characters; they are terminated by nulls.The regular expressions recognizedare described in the manual entry for .MS ed 1 ,given the above difference..SH DiagnosticsThe.PN re_execsubroutine returns \-1 for an internal error..PPThe.PN re_compsubroutinereturns one of the following strings if an error occurs:.PP.nf.B "No previous regular expression".B "Regular expression too long".B "unmatched \e(".B "missing ]".B "too many \e(\e) pairs".B "unmatched \e)".fi.SH See Alsoed(1), ex(1), egrep(1), fgrep(1), grep(1)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -