📄 wildmat.3
字号:
.\" $Revision: 1.10 $.TH WILDMAT 3.SH NAMEwildmat \- perform shell-style wildcard matching.SH SYNOPSIS.nf.B "int".B "wildmat(text, pattern)".B " char *text;".B " char *pattern;".fi.SH DESCRIPTION.I Wildmatcompares the.I textagainst the.I patternandreturns non-zero if the pattern matches the text.The pattern is interpreted according to rules similar to shell filenamewildcards, and not as a full regular expression such as those handled by the.IR grep (1)family of programs or the.IR regex (3)or.IR regexp (3)set of routines..PPThe pattern is interpreted as follows:.TP.BI \e xTurns off the special meaning of.I xand matches it directly; this is used mostly before a question mark orasterisk, and is not special inside square brackets..TP.B ?Matches any single character..TP.B *Matches any sequence of zero or more characters..TP.BI [ x...y ]Matches any single character specified by the set.IR x...y .A minus sign may be used to indicate a range of characters.That is,.I [0\-5abc]is a shorthand for.IR [012345abc] .More than one range may appear inside a character set;.I [0-9a-zA-Z._]matches almost all of the legal characters for a host name.The close bracket,.IR ] ,may be used if it is the first character in the set.The minus sign,.IR \- ,may be used if it is either the first or last character in the set..TP.BI [^ x...y ]This matches any character.I notin the set.IR x...y ,which is interpreted as described above.For example,.I [^]\-]matches any character other than a close bracket or minus sign..SH HISTORYWritten by Rich $alz <rsalz@uunet.uu.net> in 1986, and posted to Usenetseveral times since then, most notably in comp.sources.misc inMarch, 1991..PPLars Mathiesen <thorinn@diku.dk> enhanced the multi-asterisk failuremode in early 1991..PPRich and Lars increased the efficiency of star patterns and reposted itto comp.sources.misc in April, 1991..PPRobert Elz <kre@munnari.oz.au> added minus sign and close bracket handlingin June, 1991..PP.de R$This is revision \\$3, dated \\$4....R$ $Id: wildmat.3,v 1.10 1992/04/03 06:30:05 rsalz Exp $.SH "SEE ALSO"grep(1), regex(3), regexp(3).
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -