⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 regex-spencer-man.ps

📁 regex-spencer-3.8-doc.zip
💻 PS
📖 第 1 页 / 共 4 页
字号:
(RE_DUP_MAX \(255\207\) inclusi)108 328.8 R -.15(ve)-.25 G 2.542(,a).15G .042(nd if there are tw)-2.542 F 2.542(oo)-.1 G 2.542(ft)-2.542 G .042(hem, the \214rst may not e)-2.542 F .042(xceed the second.)-.15 F(An)5.043 E 1.377(atom follo)108 340.8 R 1.376(wed by a bound containing one inte)-.25 F(ger)-.15 E F2(i)3.876 E F11.376(and no comma matches a sequence of e)3.876 F(xactly)-.15 E F2(i)3.876 E F1 .689(matches of the atom.)108 352.8 R .689(An atom follo)5.689 F .689(wed by a bound containing one inte)-.25 F(ger)-.15 E F2(i)3.189 E F1 .69(and a comma matches a)3.189 F .001(sequence of)108 364.8R F2(i)2.501 E F1 0(or more matches of the atom.)2.501 F(An atom follo)5E(wed by a bound containing tw)-.25 E 2.5(oi)-.1 G(nte)-2.5 E(gers)-.15E F2(i)2.5 E F1(and)2.5 E F2(j)108 376.8 Q F1(matches a sequence of)2.5E F2(i)2.5 E F1(through)2.5 E F2(j)2.5 E F1(\(inclusi)2.5 E -.15(ve)-.25G 2.5(\)m).15 G(atches of the atom.)-2.5 E 1.606(An atom is a re)108393.6 R 1.606(gular e)-.15 F 1.606(xpression enclosed in `\(\)' \(matching a match for the re)-.15 F 1.606(gular e)-.15 F 1.606(xpression\), an)-.15 F .224(empty set of `\(\)' \(matching the null string\)\207, a)108 405.6 R F2(br)2.724 E(ac)-.15 E -.1(ke)-.2 G 2.724(te).1 G(xpr)-2.924 E(ession)-.37 E F1 .224(\(see belo)2.724 F .224(w\), `.)-.25 F 5.224('\()-.7 G.224(matching an)-5.224 F 2.724(ys)-.15 G(ingle)-2.724 E .644(character\), `^' \(matching the null string at the be)108 417.6 R .645(ginning of a line\), `$' \(matching the null string at the)-.15 F .216(end of a line\), a `\\' follo)108 429.6 R .215(wed by one of the chara\cters `^.[$\(\)|*+?{\\' \(matching that character tak)-.25 F .215(en as an)-.1 F .024(ordinary character\), a `\\' follo)108 441.6 R .024(wed by an)-.25 F 2.524(yo)-.15 G .024(ther character\207 \(matching that character tak)-2.524 F .025(en as an ordinary)-.1 F(character)108 453.6 Q 2.628(,a)-.4 G 2.628(si)-2.628 G 2.628(ft)-2.628 G .128(he `\\' had not been present\207\), or \a single character with no other signi\214cance \(matching)-2.628 F .309(that character\).)108 465.6 R 2.809(A`)5.309 G .309({' follo)-2.809 F.309(wed by a character other than a digit is an ordinary character)-.25F 2.81(,n)-.4 G .31(ot the be)-2.81 F(gin-)-.15 E(ning of a bound\207.)108 477.6 Q(It is ille)5 E -.05(ga)-.15 G 2.5(lt).05 G 2.5(oe)-2.5 G(nd an RE with `\\'.)-2.5 E(A)108 494.4 Q F2(br)3.326 E(ac)-.15 E -.1(ke)-.2 G 3.326(te).1 G(xpr)-3.526 E(ession)-.37 E F1 .826(is a list of characters enclosed in `[]'.)3.326 F .826(It normally matches an)5.826 F 3.326(ys)-.15 G .825(ingle character)-3.326 F .315(from the list \(b)108 506.4 R .315(ut see belo)-.2 F 2.815(w\). If)-.25 F .315(the list be)2.815 F .316(gins with `^', it matches an)-.15 F 2.816(ys)-.15 G .316(ingle character \(b)-2.816 F .316(ut see belo)-.2 F(w\))-.25 E F2(not)108 518.4 Q F1 .6(from the rest of the list.)3.1 F .599(If tw)5.599 F3.099(oc)-.1 G .599(haracters in the list are separated by `\255', this\ is shorthand for the)-3.099 F(full)108 530.4 Q F2 -.15(ra)3.087 G(ng).15 E(e)-.1 E F1 .587(of characters between those tw)3.087 F 3.087(o\()-.1 G(inclusi)-3.087 E -.15(ve)-.25 G 3.087(\)i).15 G 3.087(nt)-3.087 G.587(he collating sequence, e.g. `[0\2559]' in ASCII)-3.087 F .43(matches an)108 542.4 R 2.93(yd)-.15 G .43(ecimal digit.)-2.93 F .43(It is ille)5.43 F -.05(ga)-.15 G .43(l\207 for tw).05 F 2.93(or)-.1 G.43(anges to share an endpoint, e.g. `a\255c\255e'.)-2.93 F .429(Ranges are)5.429 F -.15(ve)108 554.4 S(ry collating-sequence-dependent, and portable programs should a).15 E-.2(vo)-.2 G(id relying on them.).2 E 2.006 -.8(To i)108 571.2 T .406(nclude a literal `]' in the list, mak).8 F 2.906(ei)-.1 G 2.906(tt)-2.906 G .406(he \214rst character \(follo)-2.906 F .406(wing a possible `^'\).)-.25 F 2.007 -.8(To i)5.407 H .407(nclude a lit-).8 F .322(eral `\255', mak)108 583.2 R 2.822(ei)-.1 G2.821(tt)-2.822 G .321(he \214rst or last character)-2.821 F 2.821(,o)-.4 G 2.821(rt)-2.821 G .321(he second endpoint of a range.)-2.821 F1.921 -.8(To u)5.321 H .321(se a literal `\255' as the).8 F .437(\214rst endpoint of a range, enclose it in `[.)108 595.2 R 2.937('a)-.7G .437(nd `.]' to mak)-2.937 F 2.937(ei)-.1 G 2.937(tac)-2.937 G .438(ollating element \(see belo)-2.937 F 2.938(w\). W)-.25 F .438(ith the)-.4 F -.15(ex)108 607.2 S .525(ception of these and some combinations using `[' \(see ne).15 F .524(xt paragraphs\), all other special characters,)-.15 F(including `\\', lose their special signi\214cance within a brack)108619.2 Q(et e)-.1 E(xpression.)-.15 E -.4(Wi)108 636 S .023(thin a brack).4 F .024(et e)-.1 F .024(xpression, a collating element \(a character)-.15 F 2.524(,am)-.4 G .024(ulti-character sequence that collates as)-2.524 F .377(if it were a single character)108 648 R 2.877(,o)-.4 G2.877(rac)-2.877 G .377(ollating-sequence name for either\) enclosed in `[.)-2.877 F 2.877('a)-.7 G .377(nd `.]' stands for)-2.877 F .863(the sequence of characters of that collating element.)108 660 R .864(The sequence is a single element of the brack)5.863 F(et)-.1 E -.15(ex)108 672 S(pression').15 E 3.349(sl)-.55 G 3.349(ist. A)-3.349 F(brack)3.349 E .849(et e)-.1 F .849(xpression containing a multi-character col\lating element can thus match)-.15 F .916(more than one character)108684 R 3.416(,e)-.4 G .916(.g. if the collating sequence includes a `ch'\ collating element, then the RE)-3.416 F(`[[.ch.]]*c' matches the \214rst \214v)108 696 Q 2.5(ec)-.15 G(haracters of `chchcc'.)-2.5 E -.4(Wi)108 712.8 S 1.775(thin a brack).4F 1.775(et e)-.1 F 1.775(xpression, a collating element enclosed in `[=' and `=]' is an equi)-.15 F -.25(va)-.25 G 1.775(lence class,).25 F .037(standing for the se\quences of characters of all collating elements equi)108 724.8 R -.25(va)-.25 G .038(lent to that one, including itself.).25 F .453(\(If there are no other equi)108 736.8 R -.25(va)-.25 G .453(lent coll\ating elements, the treatment is as if the enclosing delimiters were).25F(`[.)108 748.8 Q 4.921('a)-.7 G 2.421(nd `.]'.\))-4.921 F -.15(Fo)7.421G 4.921(re).15 G 2.421(xample, if o and o)-5.071 F 5.756(^a)-4.165 G2.422(re the members of an equi)-5.756 F -.25(va)-.25 G 2.422(lence class, then `[[=o=]]',).25 F(`[[=o)108 760.8 Q .835(^=)-4.165 G(]]', and `[oo)-.835 E .835(^])-4.165 G 2.5('a)-.835 G(re all synon)-2.5E 2.5(ymous. An)-.15 F(equi)2.5 E -.25(va)-.25 G(lence class may not\207 be an endpoint of a range.).25 E -.4(Wi)108777.6 S .215(thin a brack).4 F .215(et e)-.1 F .215(xpression, the name of a)-.15 F F2 -.15(ch)2.715 G(ar).15 E .215(acter class)-.15 F F1 .215(enclosed in `[:' and `:]' stands for the list of)2.715 F(25 Oct 1995)272.918 817.889 Q(5)195.917 E 0 Cg EP%%Page: 6 6%%BeginPageSetupBP%%EndPageSetup/F0 10/Times-Roman@0 SF 358.795(REGEX\(7\) REGEX\(7\))72 48 R(all characters belonging to that class.)108 84 Q(Standard character class names are:)5 E 57.539(alnum digit)144 100.8 R(punct)66.699 E 60.879(alpha graph)144 112.8 R(space)62.269 E 60.319(blank lo)144 124.8 R 60.019(wer upper)-.25 F 64.209(cntrl print)144136.8 R(xdigit)66.149 E 1.154(These stand for the character classes de\214ned in)108 153.6 R/F1 10/Times-Italic@0 SF(ctype)3.654 E F0 3.654(\(3\). A).18 F 1.155(locale may pro)3.654 F 1.155(vide others.)-.15 F 3.655(Ac)6.155 G(haracter)-3.655 E(class may not be used as an endpoint of a range.)108165.6 Q 2.052(There are tw)108 182.4 R 4.551(os)-.1 G 2.051(pecial cases\207 of brack)-4.551 F 2.051(et e)-.1 F 2.051(xpressions: the brack)-.15 F 2.051(et e)-.1 F 2.051(xpressions `[[:<:]]' and `[[:>:]]')-.15 F .311(match the null string at the be)108 194.4 R .311(ginning and end of a w)-.15 F .311(ord respecti)-.1 F -.15(ve)-.25 G(ly).15 E 5.311(.A)-.65 G -.1(wo)-2.499 G .312(rd is de\214ned as a sequence).1 F .373(of w)108 206.4 R .373(ord characters which is neither preceded nor follo)-.1 F .373(wed by w)-.25 F .373(ord characters.)-.1 F 2.873(Aw)5.373 G .372(ord character is an)-2.973 F F1(alnum)108 218.4 Q F0 .85(character \(as de\214ned by)3.35 F F1(ctype)3.35 E F0 .85(\(3\)\) or an underscore.).18 F .851(This is an e)5.85 F .851(xtension, compatible with b)-.15 F(ut)-.2 E .302(not speci\214ed by PO\SIX 1003.2, and should be used with caution in softw)108 230.4 R .302(are intended to be portable to)-.1 F(other systems.)108 242.4 Q .32(In the e)108 259.2 R -.15(ve)-.25 G .32(nt that an RE could match more than one substring of a gi).15 F -.15(ve)-.25 G 2.82(ns).15 G .321(tring, the RE matches the one)-2.82 F .866(starting earliest in the string.)108 271.2 R .865(If the RE could matc\h more than one substring starting at that point, it)5.866 F 1.401(matches the longest.)108 283.2 R(Sube)6.402 E 1.402(xpressions also ma\tch the longest possible substrings, subject to the con-)-.15 F .06(straint that the whole match be as long as possible, with sube)108295.2 R .059(xpressions starting earlier in the RE taking)-.15 F 1.781(priority o)108 307.2 R -.15(ve)-.15 G 4.282(ro).15 G 1.782(nes starting later)-4.282 F 6.782(.N)-.55 G 1.782(ote that higher)-6.782 F(-le)-.2 E -.15(ve)-.25 G 4.282(ls).15 G(ube)-4.282 E 1.782(xpressions thus tak)-.15 F 4.282(ep)-.1 G 1.782(riority o)-4.282 F -.15(ve)-.15 G 4.282(rt).15 G(heir)-4.282 E(lo)108 319.2 Q(wer)-.25 E(-le)-.2 E -.15(ve)-.25 G 2.5(lc).15 G(omponent sube)-2.5 E(xpressions.)-.15E 1.076(Match lengths are measured in characters, not collating elements.)108336 R 3.576(An)6.076 G 1.076(ull string is considered longer)-3.576 F4.293(than no match at all.)108 348 R -.15(Fo)9.293 G 6.793(re).15 G4.293(xample, `bb*' matches the three middle characters of `abbbc',)-6.943 F 2.611(`\(wee|week\)\(knights|nights\)' matches all ten charact\ers of `weeknights', when `\(.*\).*' is matched)108 360 R(ag)108 372 Q.003(ainst `abc' the parenthesized sube)-.05 F .004(xpression matches all three characters, and when `\(a*\)*' is matched)-.15 F(ag)108 384 Q(ainst `bc' both the whole RE and the parenthesized sube)-.05 E(xpression match the null string.)-.15 E 1.242(If case-independent matching is speci\214ed, the ef)108 400.8 R 1.241(fect is much as if all case distinctions had v)-.25 F(anished)-.25 E.942(from the alphabet.)108 412.8 R .942(When an alphabetic that e)5.942F .943(xists in multiple cases appears as an ordinary character)-.15 F1.569(outside a brack)108 424.8 R 1.568(et e)-.1 F 1.568(xpression, it is ef)-.15 F(fecti)-.25 E -.15(ve)-.25 G 1.568(ly transformed into a brack).15 F 1.568(et e)-.1 F 1.568(xpression containing both)-.15 F .422(cases, e.g. `x' becomes `[xX]'.)108 436.8 R .422(When it appears inside a brack)5.422 F .422(et e)-.1 F.423(xpression, all case counterparts of it)-.15 F(are added to the brack)108 448.8 Q(et e)-.1 E(xpression, so that \(e.g\.\) `[x]' becomes `[xX]' and `[^x]' becomes `[^xX]'.)-.15 E 1.303(No particular limit is imposed on the length of REs\207.)108 465.6 R1.303(Programs intended to be portable should not)6.303 F(emplo)108477.6 Q 3.62(yR)-.1 G 1.121(Es longer than 256 bytes, as an implementat\ion can refuse to accept such REs and remain)-3.62 F(POSIX-compliant.)108 489.6 Q .652(Obsolete \(`)108 506.4 R(`basic')-.74 E .651('\) re)-.74 F .651(gular e)-.15 F .651(xpressions dif)-.15 F .651(fer in se)-.25 F -.15(ve)-.25 G .651(ral respects.).15 F .651(`|', `+', and `?' are ordinary charac-)5.651 F .536(ters and there is no equi)108 518.4 R -.25(va)-.25 G .536(lent for their functionality).25 F 5.536(.T)-.65 G .536(he delimiters for bounds are `\\{' and `\\}', with)-5.536 F .714(`{' and `}' by themselv)108 530.4 R .713(es ordinary characters.)-.15 F.713(The parentheses for nested sube)5.713 F .713(xpressions are `\\\(' and)-.15 F .246(`\\\)', with `\(' and `\)' by themselv)108 542.4 R .247(es ordinary characters.)-.15 F .247(`^' is an ordinary character e)5.247 F .247(xcept at the be)-.15 F(gin-)-.15 E .486(ning of the RE or\207 the be)108 554.4 R .485(ginning of a parenthesized sube)-.15 F .485(xpression, `$' is an ordinary character e)-.15 F(xcept)-.15 E .346(at the end of the RE or\207 the end of a parenthesized sube)108 566.4 R.346(xpression, and `*' is an ordinary character if it)-.15 F .537(appears at the be)108 578.4 R .537(ginning of the RE or the be)-.15 F.536(ginning of a parenthesized sube)-.15 F .536(xpression \(after a possible)-.15 F .507(leading `^'\).)108 590.4 R(Finally)5.507 E 3.007(,t)-.65 G .507(here is one ne)-3.007 F 3.007(wt)-.25 G .507(ype of atom, a)-3.007 F F1(bac)3.008 E 3.008(kr)-.2 G(efer)-3.378 E(ence)-.37 E F0 3.008(:`)C .508(\\' follo)-3.008 F .508(wed by a non-zero deci-)-.25 F .752(mal digit)108 602.4 R F1(d)3.251 EF0 .751(matches the same sequence of characters matched by the)3.251 FF1(d)3.251 E F0 .751(th parenthesized sube)B(xpression)-.15 E 1.144(\(numbering sube)108 614.4 R 1.145(xpressions by the positions of thei\r opening parentheses, left to right\), so that \(e.g.\))-.15 F(`\\\([bc]\\\)\\1' matches `bb' or `cc' b)108 626.4 Q(ut not `bc'.)-.2 E/F2 10.95/Times-Bold@0 SF(SEE ALSO)72 643.2 Q F0(re)108 655.2 Q(ge)-.15E(x\(3\))-.15 E(POSIX 1003.2, section 2.8 \(Re)108 672 Q(gular Expression Notation\).)-.15 E F2(HIST)72 688.8 Q(OR)-.197 E(Y)-.383 E F0(Written by Henry Spencer)108 700.8 Q 2.5(,b)-.4 G(ased on the 1003.2 spec.)-2.5 E F2 -.11(BU)72 717.6 S(GS).11 E F0(Ha)108 729.6 Q(ving tw)-.2 E 2.5(ok)-.1 G(inds of REs is a botch.)-2.5 E.654(The current 1003.2 spec says that `\)' is an ordinary character in\ the absence of an unmatched `\('; this)108 746.4 R -.1(wa)108 758.4 S2.5(sa).1 G 2.5(nu)-2.5 G(nintentional result of a w)-2.5 E(ording error)-.1 E 2.5(,a)-.4 G(nd change is lik)-2.5 E(ely)-.1 E 5(.A)-.65 G -.2(vo)-5.74 G(id relying on it.).2 E .829(Back references are a dreadful botch, posing major problems for ef)108775.2 R .829(\214cient implementations.)-.25 F(The)5.829 E 3.329(ya)-.15G(re)-3.329 E 195.918(62)72 817.889 S 2.5(5O)-195.918 G(ct 1995)-2.5 E 0Cg EP%%Page: 7 7%%BeginPageSetupBP%%EndPageSetup/F0 10/Times-Roman@0 SF 358.795(REGEX\(7\) REGEX\(7\))72 48 R(also some)108 84 Q(what v)-.25 E(aguely de\214ned \(does `a\\\(\\\(b\\\)*\\2\\\)*d' match `abbbd'?\).)-.25 E -1.22 -.74(Av o)5 H(id using them.).74 E(1003.2')108 100.8 Q2.661(ss)-.55 G .161(peci\214cation of case-independent matching is v)-2.661 F 2.66(ague. The)-.25 F -.74(``)2.66 G .16(one case implies all cases').74 F 2.66('d)-.74 G(e\214ni-)-2.66 E(tion gi)108 112.8 Q -.15(ve)-.25 G 2.5(na).15 G(bo)-2.5 E .3 -.15(ve i)-.15 H 2.5(sc).15 G(urrent consensus among implementors as to the right interpretation.)-2.5 E(The syntax for w)108 129.6 Q(ord boundaries is incredibly ugly)-.1 E(.)-.65 E(25 Oct 1995)272.918 817.889 Q(7)195.917 E 0 Cg EP%%Trailerend%%EOF

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -