From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.bugs Subject: bug#36496: [PATCH] Describe the rx notation in the lisp manual Date: Sat, 6 Jul 2019 13:33:35 +0200 Message-ID: References: <0C783D67-9502-408B-B845-5599BD596361@acm.org> <838stdbw8e.fsf@gnu.org> <83r2738r9j.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Content-Type: multipart/mixed; boundary="Apple-Mail=_4EE8477A-8B77-4C86-A6A0-ED3F0D46DD21" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="80568"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 36496@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jul 06 13:47:09 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hjj9o-000KqE-95 for geb-bug-gnu-emacs@m.gmane.org; Sat, 06 Jul 2019 13:47:09 +0200 Original-Received: from localhost ([::1]:58948 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hjj9m-0006xZ-Vg for geb-bug-gnu-emacs@m.gmane.org; Sat, 06 Jul 2019 07:47:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55439) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hjixD-0008E6-Tb for bug-gnu-emacs@gnu.org; Sat, 06 Jul 2019 07:34:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hjixC-00050j-Rp for bug-gnu-emacs@gnu.org; Sat, 06 Jul 2019 07:34:07 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45445) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hjix8-0004zz-01 for bug-gnu-emacs@gnu.org; Sat, 06 Jul 2019 07:34:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hjix7-0001oP-SH for bug-gnu-emacs@gnu.org; Sat, 06 Jul 2019 07:34:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 06 Jul 2019 11:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36496 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 36496-submit@debbugs.gnu.org id=B36496.15624128266942 (code B ref 36496); Sat, 06 Jul 2019 11:34:01 +0000 Original-Received: (at 36496) by debbugs.gnu.org; 6 Jul 2019 11:33:46 +0000 Original-Received: from localhost ([127.0.0.1]:54266 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hjiws-0001nu-Fr for submit@debbugs.gnu.org; Sat, 06 Jul 2019 07:33:46 -0400 Original-Received: from mail235c50.megamailservers.eu ([91.136.10.245]:50186 helo=mail56c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hjiwp-0001nf-MU for 36496@debbugs.gnu.org; Sat, 06 Jul 2019 07:33:45 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1562412819; bh=NUPLVi/Hvh6gM5yV17+qbb8floxkzUolnuvkTEiJCYk=; h=From:Subject:Date:In-Reply-To:Cc:To:References:From; b=SQxJ/OLHtN6z6LCp8KXffpvjq0qr23kWH3AUGKwr7lghFYKPaDnGzEMZHSAqEm1N7 o8zZ61ffDaTjoLHVgnmlTTqLu0FWw7mAMYBU2+byPvupe/1ttxMLRZBtH7afzWX1gw unFrL8vv5FDFsWWiuh5y869shKodJyWffCj/Cn+E= Feedback-ID: mattiase@acm.or Original-Received: from [192.168.1.64] (c-e636e253.032-75-73746f71.bbcust.telenor.se [83.226.54.230]) (authenticated bits=0) by mail56c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id x66BXaUo016942; Sat, 6 Jul 2019 11:33:38 +0000 In-Reply-To: <83r2738r9j.fsf@gnu.org> X-Mailer: Apple Mail (2.3445.104.11) X-CTCH-RefID: str=0001.0A0B020A.5D208713.0008, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=DI6hHRFb c=1 sm=1 tr=0 a=M+GU/qJco4WXjv8D6jB2IA==:117 a=M+GU/qJco4WXjv8D6jB2IA==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=mDV3o1hIAAAA:8 a=S08f7oA2__9kJBOj998A:9 a=CjuIK1q_8ugA:10 a=P24n4mVnincD3SCcurQA:9 a=B2y7HmGcmWMA:10 a=Tkn_Sv_VdHUd6U5knqEA:9 a=_FVE-zBwftR9WsbkzFJk:22 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:162200 Archived-At: --Apple-Mail=_4EE8477A-8B77-4C86-A6A0-ED3F0D46DD21 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii 6 juli 2019 kl. 11.08 skrev Eli Zaretskii : >=20 >> It is about 7-8 pages in all. >=20 > It's more that 2500 lines. We have in doc/misc/ separate manuals much > smaller than this. So making a separate manual out of this is not > radically different from what we have already. It was a visual count of printed pages in the pdf; a lot of lines in the = source are mark-up. In any case, the attached patch has @ifnottex added to it. I didn't move = the text to a separate file, since there was no existing = "lispref-extras" document to put them in. In addition, some of the = additions were to existing sections (pcase, and the complex regexp = example). > Opinion on which matter? on whether or not make it a separate manual? > If so, you now have my opinion. Thanks, that's what I meant. > The comma is common because older versions of makeinfo insisted on > having it, and would complain if there weren't one. The latest > versions no longer complain, but we would still like to support the > old versions, as they are ~15 times faster, so some people still keep > them around. Thank you very much for clearing that up; I always wondered. Also attached is a patch for replacing the rx doc string with a = condensed summary. I basically copied the one I wrote for ry. --Apple-Mail=_4EE8477A-8B77-4C86-A6A0-ED3F0D46DD21 Content-Disposition: attachment; filename=0001-Describe-the-rx-notation-in-the-elisp-manual-bug-364.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-Describe-the-rx-notation-in-the-elisp-manual-bug-364.patch" Content-Transfer-Encoding: quoted-printable =46rom=20d5c54a21127a92e7dec1c03c262de551f3a76e27=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20=3D?UTF-8?q?Mattias=3D20Engdeg=3DC3=3DA5rd?=3D=20= =0ADate:=20Thu,=204=20Jul=202019=2013:01:52=20+0200=0A= Subject:=20[PATCH]=20Describe=20the=20rx=20notation=20in=20the=20elisp=20= manual=20(bug#36496)=0A=0A*=20doc/lispref/searching.texi=20(Regular=20= Expressions):=20New=20menu=20entry.=0A(Regexp=20Example):=20Add=20rx=20= form=20of=20the=20example.=0A(Rx=20Notation,=20Rx=20Constructs,=20Rx=20= Functions):=20New=20nodes.=0A*=20doc/lispref/control.texi=20(pcase=20= Macro):=20Describe=20the=20rx=20pattern.=0A---=0A=20= doc/lispref/control.texi=20=20=20|=20=2025=20++=0A=20= doc/lispref/searching.texi=20|=20565=20= +++++++++++++++++++++++++++++++++++++=0A=202=20files=20changed,=20590=20= insertions(+)=0A=0Adiff=20--git=20a/doc/lispref/control.texi=20= b/doc/lispref/control.texi=0Aindex=20e308d68b75..de6cd9301f=20100644=0A= ---=20a/doc/lispref/control.texi=0A+++=20b/doc/lispref/control.texi=0A@@=20= -618,6=20+618,31=20@@=20pcase=20Macro=0A=20to=20@var{body-forms}=20(thus=20= avoiding=20an=20evaluation=20error=20on=20match),=0A=20if=20any=20of=20= the=20sub-patterns=20let-binds=20a=20set=20of=20symbols,=0A=20they=20= @emph{must}=20all=20bind=20the=20same=20set=20of=20symbols.=0A+=0A= +@ifnottex=0A+@anchor{rx=20in=20pcase}=0A+@item=20(rx=20= @var{rx-expr}@dots{})=0A+Matches=20strings=20against=20the=20regexp=20= @var{rx-expr}@dots{},=20using=20the=0A+@code{rx}=20regexp=20notation=20= (@pxref{Rx=20Notation}),=20as=20if=20by=0A+@code{string-match}.=0A+=0A= +In=20addition=20to=20the=20usual=20@code{rx}=20syntax,=20= @var{rx-expr}@dots{}=20can=0A+contain=20the=20following=20constructs:=0A= +=0A+@table=20@code=0A+@item=20(let=20@var{ref}=20@var{rx-expr}@dots{})=0A= +Bind=20the=20symbol=20@var{ref}=20to=20a=20submatch=20that=20matches=0A= +@var{rx-expr}@enddots{}.=20=20@var{ref}=20is=20bound=20in=20= @var{body-forms}=20to=0A+the=20string=20of=20the=20submatch=20or=20nil,=20= but=20can=20also=20be=20used=20in=0A+@code{backref}.=0A+=0A+@item=20= (backref=20@var{ref})=0A+Like=20the=20standard=20@code{backref}=20= construct,=20but=20@var{ref}=20can=20here=0A+also=20be=20a=20name=20= introduced=20by=20a=20previous=20@code{(let=20@var{ref}=20@dots{})}=0A= +construct.=0A+@end=20table=0A+@end=20ifnottex=0A+=0A=20@end=20table=0A=20= =0A=20@anchor{pcase-example-0}=0Adiff=20--git=20= a/doc/lispref/searching.texi=20b/doc/lispref/searching.texi=0Aindex=20= ef1cffc446..17c4790f5e=20100644=0A---=20a/doc/lispref/searching.texi=0A= +++=20b/doc/lispref/searching.texi=0A@@=20-254,6=20+254,9=20@@=20Regular=20= Expressions=0A=20@menu=0A=20*=20Syntax=20of=20Regexps::=20=20=20=20=20=20= =20Rules=20for=20writing=20regular=20expressions.=0A=20*=20Regexp=20= Example::=20=20=20=20=20=20=20=20=20=20Illustrates=20regular=20= expression=20syntax.=0A+@ifnottex=0A+*=20Rx=20Notation::=20=20=20=20=20=20= =20=20=20=20=20=20=20An=20alternative,=20structured=20regexp=20notation.=0A= +@end=20ifnottex=0A=20*=20Regexp=20Functions::=20=20=20=20=20=20=20=20= Functions=20for=20operating=20on=20regular=20expressions.=0A=20@end=20= menu=0A=20=0A@@=20-359,6=20+362,7=20@@=20Regexp=20Special=0A=20preceding=20= expression=20either=20once=20or=20not=20at=20all.=20=20For=20example,=0A=20= @samp{ca?r}=20matches=20@samp{car}=20or=20@samp{cr};=20nothing=20else.=0A= =20=0A+@anchor{Non-greedy=20repetition}=0A=20@item=20@samp{*?},=20= @samp{+?},=20@samp{??}=0A=20@cindex=20non-greedy=20repetition=20= characters=20in=20regexp=0A=20These=20are=20@dfn{non-greedy}=20variants=20= of=20the=20operators=20@samp{*},=20@samp{+}=0A@@=20-951,6=20+955,567=20= @@=20Regexp=20Example=0A=20beyond=20the=20minimum=20needed=20to=20end=20= a=20sentence.=0A=20@end=20table=0A=20=0A+@ifnottex=0A+In=20the=20= @code{rx}=20notation=20(@pxref{Rx=20Notation}),=20the=20regexp=20could=20= be=20written=0A+=0A+@example=0A+@group=0A+(rx=20(any=20".?!")=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20;=20Punctuation=20ending=20= sentence.=0A+=20=20=20=20(zero-or-more=20(any=20"\"')]@}"))=20=20;=20= Closing=20quotes=20or=20brackets.=0A+=20=20=20=20(or=20line-end=0A+=20=20= =20=20=20=20=20=20(seq=20"=20"=20line-end)=0A+=20=20=20=20=20=20=20=20= "\t"=0A+=20=20=20=20=20=20=20=20"=20=20")=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20;=20Two=20spaces.=0A+=20=20=20=20= (zero-or-more=20(any=20"\t\n=20")))=20=20;=20Optional=20extra=20= whitespace.=0A+@end=20group=0A+@end=20example=0A+=0A+Since=20@code{rx}=20= regexps=20are=20just=20S-expressions,=20they=20can=20be=20formatted=0A= +and=20commented=20as=20such.=0A+@end=20ifnottex=0A+=0A+@ifnottex=0A= +@node=20Rx=20Notation=0A+@subsection=20The=20@code{rx}=20Structured=20= Regexp=20Notation=0A+@cindex=20rx=0A+@cindex=20regexp=20syntax=0A+=0A+=20= =20As=20an=20alternative=20to=20the=20string-based=20syntax,=20Emacs=20= provides=20the=0A+structured=20@code{rx}=20notation=20based=20on=20Lisp=20= S-expressions.=20=20This=0A+notation=20is=20usually=20easier=20to=20= read,=20write=20and=20maintain=20than=20regexp=0A+strings,=20and=20can=20= be=20indented=20and=20commented=20freely.=20=20It=20requires=20a=0A= +conversion=20into=20string=20form=20since=20that=20is=20what=20regexp=20= functions=0A+expect,=20but=20that=20conversion=20typically=20takes=20= place=20during=0A+byte-compilation=20rather=20than=20when=20the=20Lisp=20= code=20using=20the=20regexp=20is=0A+run.=0A+=0A+=20=20Here=20is=20an=20= @code{rx}=20regexp@footnote{It=20could=20be=20written=20much=0A+simpler=20= with=20non-greedy=20operators=20(how?),=20but=20that=20would=20make=20= the=0A+example=20less=20interesting.}=20that=20matches=20a=20block=20= comment=20in=20the=20C=0A+programming=20language:=0A+=0A+@example=0A= +@group=0A+(rx=20"/*"=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20;=20Initial=20/*=0A+=20=20=20=20(zero-or-more=0A= +=20=20=20=20=20(or=20(not=20(any=20"*"))=20=20=20=20=20=20=20=20=20=20;=20= =20Either=20non-*,=0A+=20=20=20=20=20=20=20=20=20(seq=20"*"=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20;=20=20or=20*=20followed=20by=0A+=20=20= =20=20=20=20=20=20=20=20=20=20=20=20(not=20(any=20"/")))))=20=20;=20=20= non-/=0A+=20=20=20=20(one-or-more=20"*")=20=20=20=20=20=20=20=20=20=20=20= =20=20;=20At=20least=20one=20star,=0A+=20=20=20=20"/")=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20;=20and=20the=20= final=20/=0A+@end=20group=0A+@end=20example=0A+=0A+@noindent=0A+or,=20= using=20shorter=20synonyms=20and=20written=20more=20compactly,=0A+=0A= +@example=0A+@group=0A+(rx=20"/*"=0A+=20=20=20=20(*=20(|=20(not=20(any=20= "*"))=0A+=20=20=20=20=20=20=20=20=20=20(:=20"*"=20(not=20(any=20"/")))))=0A= +=20=20=20=20(+=20"*")=20"/")=0A+@end=20group=0A+@end=20example=0A+=0A= +@noindent=0A+In=20conventional=20string=20syntax,=20it=20would=20be=20= written=0A+=0A+@example=0A+"/\\*\\(?:[^*]\\|\\*[^/]\\)*\\*+/"=0A+@end=20= example=0A+=0A+The=20@code{rx}=20notation=20is=20mainly=20useful=20in=20= Lisp=20code;=20it=20cannot=20be=0A+used=20in=20most=20interactive=20= situations=20where=20a=20regexp=20is=20requested,=20such=0A+as=20when=20= running=20@code{query-replace-regexp}=20or=20in=20variable=0A= +customisation.=0A+=0A+@menu=0A+*=20Rx=20Constructs::=20=20=20=20=20=20=20= Constructs=20valid=20in=20rx=20forms.=0A+*=20Rx=20Functions::=20=20=20=20= =20=20=20=20Functions=20and=20macros=20that=20use=20rx=20forms.=0A+@end=20= menu=0A+=0A+@node=20Rx=20Constructs=0A+@subsubsection=20Constructs=20in=20= @code{rx}=20regexps=0A+=0A+The=20various=20forms=20in=20@code{rx}=20= regexps=20are=20described=20below.=20=20The=0A+shorthand=20@var{rx}=20= represents=20any=20@code{rx}=20form,=20and=20@var{rx}@dots{}=0A+means=20= one=20or=20more=20@code{rx}=20forms.=20=20Where=20the=20corresponding=20= string=0A+regexp=20syntax=20is=20given,=20@var{A},=20@var{B},=20@dots{}=20= are=20string=20regexp=0A+subexpressions.=0A+@c=20With=20the=20new=20= implementation=20of=20rx,=20this=20can=20be=20changed=20from=0A+@c=20= 'one=20or=20more'=20to=20'zero=20or=20more'.=0A+=0A+@subsubheading=20= Literals=0A+=0A+@table=20@asis=0A+@item=20@code{"some-string"}=0A+Match=20= the=20string=20@samp{some-string}=20literally.=20=20There=20are=20no=0A= +characters=20with=20special=20meaning,=20unlike=20in=20string=20= regexps.=0A+=0A+@item=20@code{?C}=0A+Match=20the=20character=20@samp{C}=20= literally.=0A+@end=20table=0A+=0A+@subsubheading=20Fundamental=20= structure=0A+=0A+@table=20@asis=0A+@item=20@code{(seq=20= @var{rx}@dots{})}=0A+@cindex=20@code{seq}=20in=20rx=0A+@itemx=20= @code{(sequence=20@var{rx}@dots{})}=0A+@cindex=20@code{sequence}=20in=20= rx=0A+@itemx=20@code{(:=20@var{rx}@dots{})}=0A+@cindex=20@code{:}=20in=20= rx=0A+@itemx=20@code{(and=20@var{rx}@dots{})}=0A+@cindex=20@code{and}=20= in=20rx=0A+Match=20the=20@var{rx}s=20in=20sequence.=20=20Without=20= arguments,=20the=20expression=0A+matches=20the=20empty=20string.@*=0A= +Corresponding=20string=20regexp:=20@samp{@var{A}@var{B}@dots{}}=0A= +(subexpressions=20in=20sequence).=0A+=0A+@item=20@code{(or=20= @var{rx}@dots{})}=0A+@cindex=20@code{or}=20in=20rx=0A+@itemx=20@code{(|=20= @var{rx}@dots{})}=0A+@cindex=20@code{|}=20in=20rx=0A+Match=20exactly=20= one=20of=20the=20@var{rx}s,=20trying=20from=20left=20to=20right.=0A= +Without=20arguments,=20the=20expression=20will=20not=20match=20anything=20= at=20all.@*=0A+Corresponding=20string=20regexp:=20= @samp{@var{A}\|@var{B}\|@dots{}}.=0A+@end=20table=0A+=0A+@subsubheading=20= Repetition=0A+=0A+@table=20@code=0A+@item=20(zero-or-more=20= @var{rx}@dots{})=0A+@cindex=20@code{zero-or-more}=20in=20rx=0A+@itemx=20= (0+=20@var{rx}@dots{})=0A+@cindex=20@code{0+}=20in=20rx=0A+@itemx=20(*=20= @var{rx}@dots{})=0A+@cindex=20@code{*}=20in=20rx=0A+Match=20the=20= @var{rx}s=20zero=20or=20more=20times.@*=0A+Corresponding=20string=20= regexp:=20@samp{@var{A}*}=0A+=0A+@item=20(one-or-more=20@var{rx}@dots{})=0A= +@cindex=20@code{one-or-more}=20in=20rx=0A+@itemx=20(1+=20= @var{rx}@dots{})=0A+@cindex=20@code{1+}=20in=20rx=0A+@itemx=20(+=20= @var{rx}@dots{})=0A+@cindex=20@code{+}=20in=20rx=0A+Match=20the=20= @var{rx}s=20one=20or=20more=20times.@*=0A+Corresponding=20string=20= regexp:=20@samp{@var{A}+}=0A+=0A+@item=20(zero-or-one=20@var{rx}@dots{})=0A= +@cindex=20@code{zero-or-one}=20in=20rx=0A+@itemx=20(optional=20= @var{rx}@dots{})=0A+@cindex=20@code{optional}=20in=20rx=0A+@itemx=20(opt=20= @var{rx}@dots{})=0A+@cindex=20@code{opt}=20in=20rx=0A+@itemx=20(?=20= @var{rx}@dots{})=0A+@cindex=20@code{?}=20in=20rx=0A+Match=20the=20= @var{rx}s=20once=20or=20an=20empty=20string.@*=0A+Corresponding=20string=20= regexp:=20@samp{@var{A}?}=0A+=0A+@item=20(=3D=20@var{n}=20= @var{rx}@dots{})=0A+@cindex=20@code{=3D}=20in=20rx=0A+@itemx=20(repeat=20= @var{n}=20@var{rx})=0A+Match=20the=20@var{rx}s=20exactly=20@var{n}=20= times.@*=0A+Corresponding=20string=20regexp:=20= @samp{@var{A}\@{@var{n}\@}}=0A+=0A+@item=20(>=3D=20@var{n}=20= @var{rx}@dots{})=0A+@cindex=20@code{>=3D}=20in=20rx=0A+Match=20the=20= @var{rx}s=20@var{n}=20or=20more=20times.@*=0A+Corresponding=20string=20= regexp:=20@samp{@var{A}\@{@var{n},\@}}=0A+=0A+@item=20(**=20@var{n}=20= @var{m}=20@var{rx}@dots{})=0A+@cindex=20@code{**}=20in=20rx=0A+@itemx=20= (repeat=20@var{n}=20@var{m}=20@var{rx}@dots{})=0A+@cindex=20= @code{repeat}=20in=20rx=0A+Match=20the=20@var{rx}s=20at=20least=20= @var{n}=20but=20no=20more=20than=20@var{m}=20times.@*=0A+Corresponding=20= string=20regexp:=20@samp{@var{A}\@{@var{n},@var{m}\@}}=0A+@end=20table=0A= +=0A+@subsubheading=20Non-greedy=20repetition=0A+=0A+Normally,=20= repetition=20forms=20are=20greedy,=20in=20that=20they=20attempt=20to=20= match=0A+as=20many=20times=20as=20possible.=20=20The=20following=20three=20= forms=20are=20non-greedy;=20they=0A+try=20to=20match=20as=20few=20times=20= as=20possible=20(@pxref{Non-greedy=20repetition}).=0A+=0A+@table=20@code=0A= +@item=20(*?=20@var{rx}@dots{})=0A+@cindex=20@code{*?}=20in=20rx=0A= +Match=20the=20@var{rx}s=20zero=20or=20more=20times,=20non-greedily.@*=0A= +Corresponding=20string=20regexp:=20@samp{@var{A}*?}=0A+=0A+@item=20(+?=20= @var{rx}@dots{})=0A+@cindex=20@code{+?}=20in=20rx=0A+Match=20the=20= @var{rx}s=20one=20or=20more=20times,=20non-greedily.@*=0A+Corresponding=20= string=20regexp:=20@samp{@var{A}+?}=0A+=0A+@item=20(??=20= @var{rx}@dots{})=0A+@cindex=20@code{??}=20in=20rx=0A+Match=20the=20= @var{rx}s=20or=20an=20empty=20string,=20non-greedily.@*=0A+Corresponding=20= string=20regexp:=20@samp{@var{A}??}=0A+@end=20table=0A+=0A+The=20= greediness=20of=20some=20repetition=20forms=20can=20be=20controlled=20= using=20the=0A+following=20constructs.=20=20However,=20it=20is=20usually=20= better=20to=20use=20the=0A+explicit=20non-greedy=20forms=20above=20= instead.=0A+=0A+@table=20@code=0A+@item=20(minimal-match=20@var{rx})=0A= +@cindex=20@code{minimal-match}=20in=20rx=0A+Match=20@var{rx},=20with=20= @code{zero-or-more},=20@code{0+},=0A+@code{one-or-more},=20@code{1+},=20= @code{zero-or-one},=20@code{opt}=20and=0A+@code{option}=20using=20= non-greedy=20matching.=0A+=0A+@item=20(maximal-match=20@var{rx})=0A= +@cindex=20@code{maximal-match}=20in=20rx=0A+Match=20@var{rx},=20with=20= @code{zero-or-more},=20@code{0+},=0A+@code{one-or-more},=20@code{1+},=20= @code{zero-or-one},=20@code{opt}=20and=0A+@code{option}=20using=20= non-greedy=20matching.=20=20This=20is=20the=20default.=0A+@end=20table=0A= +=0A+@subsubheading=20Matching=20single=20characters=0A+=0A+@table=20= @asis=0A+@item=20@code{(any=20@var{set}@dots{})}=0A+@cindex=20@code{any}=20= in=20rx=0A+@itemx=20@code{(char=20@var{set}@dots{})}=0A+@cindex=20= @code{char}=20in=20rx=0A+@itemx=20@code{(in=20@var{set}@dots{})}=0A= +@cindex=20@code{in}=20in=20rx=0A+@cindex=20character=20class=20in=20rx=0A= +Match=20a=20single=20character=20from=20one=20of=20the=20@var{set}s.=20=20= Each=20@var{set}=0A+is=20a=20character,=20a=20string=20representing=20= the=20set=20of=20its=20characters,=20a=0A+range=20or=20a=20character=20= class=20(see=20below).=20=20A=20range=20is=20either=20a=0A= +hyphen-separated=20string=20like=20@code{"A-Z"},=20or=20a=20cons=20of=20= characters=0A+like=20@code{(?A=20.=20?Z)}.=0A+=0A+Note=20that=20hyphen=20= (@code{-})=20is=20special=20in=20strings=20in=20this=20construct,=0A= +since=20it=20acts=20as=20a=20range=20separator.=20=20To=20include=20a=20= hyphen,=20add=20it=20as=20a=0A+separate=20character=20or=20= single-character=20string.@*=0A+Corresponding=20string=20regexp:=20= @samp{[@dots{}]}=0A+=0A+@item=20@code{(not=20@var{charspec})}=0A+@cindex=20= @code{not}=20in=20rx=0A+Match=20a=20character=20not=20included=20in=20= @var{charspec}.=20=20@var{charspec}=20can=0A+be=20an=20@code{any},=20= @code{syntax}=20or=20@code{category}=20form,=20or=20a=0A+character=20= class.@*=0A+Corresponding=20string=20regexp:=20@samp{[^@dots{}]},=20= @samp{\S@var{code}},=0A+@samp{\C@var{code}}=0A+=0A+@item=20= @code{not-newline},=20@code{nonl}=0A+@cindex=20@code{not-newline}=20in=20= rx=0A+@cindex=20@code{nonl}=20in=20rx=0A+Match=20any=20character=20= except=20a=20newline.@*=0A+Corresponding=20string=20regexp:=20@samp{.}=20= (dot)=0A+=0A+@item=20@code{anything}=0A+@cindex=20@code{anything}=20in=20= rx=0A+Match=20any=20character.@*=0A+Corresponding=20string=20regexp:=20= @samp{.\|\n}=20(for=20example)=0A+=0A+@item=20character=20class=0A= +@cindex=20character=20class=20in=20rx=0A+Match=20a=20character=20from=20= a=20named=20character=20class:=0A+=0A+@table=20@asis=0A+@item=20= @code{alpha},=20@code{alphabetic},=20@code{letter}=0A+Match=20alphabetic=20= characters.=20=20More=20precisely,=20match=20characters=20whose=0A= +Unicode=20@samp{general-category}=20property=20indicates=20that=20they=20= are=0A+alphabetic.=0A+=0A+@item=20@code{alnum},=20@code{alphanumeric}=0A= +Match=20alphabetic=20characters=20and=20digits.=20=20More=20precisely,=20= match=0A+characters=20whose=20Unicode=20@samp{general-category}=20= property=20indicates=0A+that=20they=20are=20alphabetic=20or=20decimal=20= digits.=0A+=0A+@item=20@code{digit},=20@code{numeric},=20@code{num}=0A= +Match=20the=20digits=20@samp{0}--@samp{9}.=0A+=0A+@item=20= @code{xdigit},=20@code{hex-digit},=20@code{hex}=0A+Match=20the=20= hexadecimal=20digits=20@samp{0}--@samp{9},=20@samp{A}--@samp{F}=0A+and=20= @samp{a}--@samp{f}.=0A+=0A+@item=20@code{cntrl},=20@code{control}=0A= +Match=20any=20character=20whose=20code=20is=20in=20the=20range=200--31.=0A= +=0A+@item=20@code{blank}=0A+Match=20horizontal=20whitespace.=20=20More=20= precisely,=20match=20characters=20whose=0A+Unicode=20= @samp{general-category}=20property=20indicates=20that=20they=20are=0A= +spacing=20separators.=0A+=0A+@item=20@code{space},=20@code{whitespace},=20= @code{white}=0A+Match=20any=20character=20that=20has=20whitespace=20= syntax=0A+(@pxref{Syntax=20Class=20Table}).=0A+=0A+@item=20@code{lower},=20= @code{lower-case}=0A+Match=20anything=20lower-case,=20as=20determined=20= by=20the=20current=20case=20table.=0A+If=20@code{case-fold-search}=20is=20= non-nil,=20this=20also=20matches=20any=0A+upper-case=20letter.=0A+=0A= +@item=20@code{upper},=20@code{upper-case}=0A+Match=20anything=20= upper-case,=20as=20determined=20by=20the=20current=20case=20table.=0A+If=20= @code{case-fold-search}=20is=20non-nil,=20this=20also=20matches=20any=0A= +lower-case=20letter.=0A+=0A+@item=20@code{graph},=20@code{graphic}=0A= +Match=20any=20character=20except=20whitespace,=20@acronym{ASCII}=20and=0A= +non-@acronym{ASCII}=20control=20characters,=20surrogates,=20and=20= codepoints=0A+unassigned=20by=20Unicode,=20as=20indicated=20by=20the=20= Unicode=0A+@samp{general-category}=20property.=0A+=0A+@item=20= @code{print},=20@code{printing}=0A+Match=20whitespace=20or=20a=20= character=20matched=20by=20@code{graph}.=0A+=0A+@item=20@code{punct},=20= @code{punctuation}=0A+Match=20any=20punctuation=20character.=20=20(At=20= present,=20for=20multibyte=0A+characters,=20anything=20that=20has=20= non-word=20syntax.)=0A+=0A+@item=20@code{word},=20@code{wordchar}=0A= +Match=20any=20character=20that=20has=20word=20syntax=20(@pxref{Syntax=20= Class=20Table}).=0A+=0A+@item=20@code{ascii}=0A+Match=20any=20= @acronym{ASCII}=20character=20(codes=200--127).=0A+=0A+@item=20= @code{nonascii}=0A+Match=20any=20non-@acronym{ASCII}=20character=20(but=20= not=20raw=20bytes).=0A+@end=20table=0A+=0A+Corresponding=20string=20= regexp:=20@samp{[[:@var{class}:]]}=0A+=0A+@item=20@code{(syntax=20= @var{syntax})}=0A+@cindex=20@code{syntax}=20in=20rx=0A+Match=20a=20= character=20with=20syntax=20@var{syntax},=20being=20one=20of=20the=20= following=0A+names:=0A+=0A+@multitable=20{@code{close-parenthesis}}=20= {Syntax=20character}=0A+@headitem=20Syntax=20name=20=20=20=20=20=20=20=20= =20=20@tab=20Syntax=20character=0A+@item=20@code{whitespace}=20=20=20=20=20= =20=20=20@tab=20@code{-}=0A+@item=20@code{punctuation}=20=20=20=20=20=20=20= @tab=20@code{.}=0A+@item=20@code{word}=20=20=20=20=20=20=20=20=20=20=20=20= =20=20@tab=20@code{w}=0A+@item=20@code{symbol}=20=20=20=20=20=20=20=20=20= =20=20=20@tab=20@code{_}=0A+@item=20@code{open-parenthesis}=20=20@tab=20= @code{(}=0A+@item=20@code{close-parenthesis}=20@tab=20@code{)}=0A+@item=20= @code{expression-prefix}=20@tab=20@code{'}=0A+@item=20= @code{string-quote}=20=20=20=20=20=20@tab=20@code{"}=0A+@item=20= @code{paired-delimiter}=20=20@tab=20@code{$}=0A+@item=20@code{escape}=20=20= =20=20=20=20=20=20=20=20=20=20@tab=20@code{\}=0A+@item=20= @code{character-quote}=20=20=20@tab=20@code{/}=0A+@item=20= @code{comment-start}=20=20=20=20=20@tab=20@code{<}=0A+@item=20= @code{comment-end}=20=20=20=20=20=20=20@tab=20@code{>}=0A+@item=20= @code{string-delimiter}=20=20@tab=20@code{|}=0A+@item=20= @code{comment-delimiter}=20@tab=20@code{!}=0A+@end=20multitable=0A+=0A= +For=20details,=20@pxref{Syntax=20Class=20Table}.=20=20Please=20note=20= that=0A+@code{(syntax=20punctuation)}=20is=20@emph{not}=20equivalent=20= to=20the=20character=20class=0A+@code{punctuation}.@*=0A+Corresponding=20= string=20regexp:=20@samp{\s@var{code}}=0A+=0A+@item=20@code=20{(category=20= @var{category})}=0A+@cindex=20@code{category}=20in=20rx=0A+Match=20a=20= character=20in=20category=20@var{category},=20which=20is=20either=20one=20= of=0A+the=20names=20below=20or=20its=20category=20character.=0A+=0A= +@multitable=20{@code{vowel-modifying-diacritical-mark}}=20{Category=20= character}=0A+@headitem=20Category=20name=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20@tab=20Category=20character=0A+@item=20= @code{space-for-indent}=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= @tab=20space=0A+@item=20@code{base}=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20@tab=20@code{.}=0A+@item=20= @code{consonant}=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20@tab=20@code{0}=0A+@item=20@code{base-vowel}=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20@tab=20@code{1}=0A= +@item=20@code{upper-diacritical-mark}=20=20=20=20=20=20=20=20=20=20=20= @tab=20@code{2}=0A+@item=20@code{lower-diacritical-mark}=20=20=20=20=20=20= =20=20=20=20=20@tab=20@code{3}=0A+@item=20@code{tone-mark}=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20@tab=20@code{4}=0A= +@item=20@code{symbol}=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20@tab=20@code{5}=0A+@item=20@code{digit}=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20@tab=20@code{6}=0A+@item=20@code{vowel-modifying-diacritical-mark}=20= @tab=20@code{7}=0A+@item=20@code{vowel-sign}=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20@tab=20@code{8}=0A+@item=20= @code{semivowel-lower}=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20@tab=20@code{9}=0A+@item=20@code{not-at-end-of-line}=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20@tab=20@code{<}=0A+@item=20= @code{not-at-beginning-of-line}=20=20=20=20=20=20=20=20=20@tab=20= @code{>}=0A+@item=20@code{alpha-numeric-two-byte}=20=20=20=20=20=20=20=20= =20=20=20@tab=20@code{A}=0A+@item=20@code{chinese-two-byte}=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20@tab=20@code{C}=0A+@item=20= @code{greek-two-byte}=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20@tab=20@code{G}=0A+@item=20@code{japanese-hiragana-two-byte}=20=20=20=20= =20=20=20@tab=20@code{H}=0A+@item=20@code{indian-two-byte}=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20@tab=20@code{I}=0A+@item=20= @code{japanese-katakana-two-byte}=20=20=20=20=20=20=20@tab=20@code{K}=0A= +@item=20@code{strong-left-to-right}=20=20=20=20=20=20=20=20=20=20=20=20=20= @tab=20@code{L}=0A+@item=20@code{korean-hangul-two-byte}=20=20=20=20=20=20= =20=20=20=20=20@tab=20@code{N}=0A+@item=20@code{strong-right-to-left}=20=20= =20=20=20=20=20=20=20=20=20=20=20@tab=20@code{R}=0A+@item=20= @code{cyrillic-two-byte}=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= @tab=20@code{Y}=0A+@item=20@code{combining-diacritic}=20=20=20=20=20=20=20= =20=20=20=20=20=20=20@tab=20@code{^}=0A+@item=20@code{ascii}=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= @tab=20@code{a}=0A+@item=20@code{arabic}=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20@tab=20@code{b}=0A+@item=20= @code{chinese}=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20@tab=20@code{c}=0A+@item=20@code{ethiopic}=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20@tab=20= @code{e}=0A+@item=20@code{greek}=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20@tab=20@code{g}=0A+@item=20= @code{korean}=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20@tab=20@code{h}=0A+@item=20@code{indian}=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= @tab=20@code{i}=0A+@item=20@code{japanese}=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20@tab=20@code{j}=0A+@item=20= @code{japanese-katakana}=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= @tab=20@code{k}=0A+@item=20@code{latin}=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20@tab=20@code{l}=0A+@item=20= @code{lao}=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20@tab=20@code{o}=0A+@item=20@code{tibetan}=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= @tab=20@code{q}=0A+@item=20@code{japanese-roman}=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20@tab=20@code{r}=0A+@item=20@code{thai}=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20@tab=20@code{t}=0A+@item=20@code{vietnamese}=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20@tab=20@code{v}=0A+@item=20= @code{hebrew}=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20@tab=20@code{w}=0A+@item=20@code{cyrillic}=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20@tab=20= @code{y}=0A+@item=20@code{can-break}=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20@tab=20@code{|}=0A+@end=20multitable=0A= +=0A+For=20more=20information=20about=20currently=20defined=20= categories,=20run=20the=0A+command=20@kbd{M-x=20describe-categories=20= @key{RET}}.=20=20For=20how=20to=20define=0A+new=20categories,=20= @pxref{Categories}.@*=0A+Corresponding=20string=20regexp:=20= @samp{\c@var{code}}=0A+@end=20table=0A+=0A+@subsubheading=20Zero-width=20= assertions=0A+=0A+These=20all=20match=20the=20empty=20string,=20but=20= only=20in=20specific=20places.=0A+=0A+@table=20@asis=0A+@item=20= @code{line-start},=20@code{bol}=0A+@cindex=20@code{line-start}=20in=20rx=0A= +@cindex=20@code{bol}=20in=20rx=0A+Match=20at=20the=20beginning=20of=20a=20= line.@*=0A+Corresponding=20string=20regexp:=20@samp{^}=0A+=0A+@item=20= @code{line-end},=20@code{eol}=0A+@cindex=20@code{line-end}=20in=20rx=0A= +@cindex=20@code{eol}=20in=20rx=0A+Match=20at=20the=20end=20of=20a=20= line.@*=0A+Corresponding=20string=20regexp:=20@samp{$}=0A+=0A+@item=20= @code{string-start},=20@code{bos},=20@code{buffer-start},=20@code{bot}=0A= +@cindex=20@code{string-start}=20in=20rx=0A+@cindex=20@code{bos}=20in=20= rx=0A+@cindex=20@code{buffer-start}=20in=20rx=0A+@cindex=20@code{bot}=20= in=20rx=0A+Match=20at=20the=20start=20of=20the=20string=20or=20buffer=20= being=20matched=20against.@*=0A+Corresponding=20string=20regexp:=20= @samp{\`}=0A+=0A+@item=20@code{string-end},=20@code{eos},=20= @code{buffer-end},=20@code{eot}=0A+@cindex=20@code{string-end}=20in=20rx=0A= +@cindex=20@code{eos}=20in=20rx=0A+@cindex=20@code{buffer-end}=20in=20rx=0A= +@cindex=20@code{eot}=20in=20rx=0A+Match=20at=20the=20end=20of=20the=20= string=20or=20buffer=20being=20matched=20against.@*=0A+Corresponding=20= string=20regexp:=20@samp{\'}=0A+=0A+@item=20@code{point}=0A+@cindex=20= @code{point}=20in=20rx=0A+Match=20at=20point.@*=0A+Corresponding=20= string=20regexp:=20@samp{\=3D}=0A+=0A+@item=20@code{word-start}=0A= +@cindex=20@code{word-start}=20in=20rx=0A+Match=20at=20the=20beginning=20= of=20a=20word.@*=0A+Corresponding=20string=20regexp:=20@samp{\<}=0A+=0A= +@item=20@code{word-end}=0A+@cindex=20@code{word-end}=20in=20rx=0A+Match=20= at=20the=20end=20of=20a=20word.@*=0A+Corresponding=20string=20regexp:=20= @samp{\>}=0A+=0A+@item=20@code{word-boundary}=0A+@cindex=20= @code{word-boundary}=20in=20rx=0A+Match=20at=20the=20beginning=20or=20= end=20of=20a=20word.@*=0A+Corresponding=20string=20regexp:=20@samp{\b}=0A= +=0A+@item=20@code{not-word-boundary}=0A+@cindex=20= @code{not-word-boundary}=20in=20rx=0A+Match=20anywhere=20but=20at=20the=20= beginning=20or=20end=20of=20a=20word.@*=0A+Corresponding=20string=20= regexp:=20@samp{\B}=0A+=0A+@item=20@code{symbol-start}=0A+@cindex=20= @code{symbol-start}=20in=20rx=0A+Match=20at=20the=20beginning=20of=20a=20= symbol.@*=0A+Corresponding=20string=20regexp:=20@samp{\_<}=0A+=0A+@item=20= @code{symbol-end}=0A+@cindex=20@code{symbol-end}=20in=20rx=0A+Match=20at=20= the=20end=20of=20a=20symbol.@*=0A+Corresponding=20string=20regexp:=20= @samp{\_>}=0A+@end=20table=0A+=0A+@subsubheading=20Capture=20groups=0A+=0A= +@table=20@code=0A+@item=20(group=20@var{rx}@dots{})=0A+@cindex=20= @code{group}=20in=20rx=0A+@itemx=20(submatch=20@var{rx}@dots{})=0A= +@cindex=20@code{submatch}=20in=20rx=0A+Match=20the=20@var{rx}s,=20= making=20the=20matched=20text=20and=20position=20accessible=0A+in=20the=20= match=20data.=20=20The=20first=20group=20in=20a=20regexp=20is=20numbered=20= 1;=0A+subsequent=20groups=20will=20be=20numbered=20one=20higher=20than=20= the=20previous=0A+group.@*=0A+Corresponding=20string=20regexp:=20= @samp{\(@dots{}\)}=0A+=0A+@item=20(group-n=20@var{n}=20@var{rx}@dots{})=0A= +@cindex=20@code{group-n}=20in=20rx=0A+@itemx=20(submatch-n=20@var{n}=20= @var{rx}@dots{})=0A+@cindex=20@code{submatch-n}=20in=20rx=0A+Like=20= @code{group},=20but=20explicitly=20assign=20the=20group=20number=20= @var{n}.=0A+@var{n}=20must=20be=20positive.@*=0A+Corresponding=20string=20= regexp:=20@samp{\(?@var{n}:@dots{}\)}=0A+=0A+@item=20(backref=20@var{n})=0A= +@cindex=20@code{backref}=20in=20rx=0A+Match=20the=20text=20previously=20= matched=20by=20group=20number=20@var{n}.=0A+@var{n}=20must=20be=20in=20= the=20range=201--9.@*=0A+Corresponding=20string=20regexp:=20= @samp{\@var{n}}=0A+@end=20table=0A+=0A+@subsubheading=20Dynamic=20= inclusion=0A+=0A+@table=20@code=0A+@item=20(literal=20@var{expr})=0A= +@cindex=20@code{literal}=20in=20rx=0A+Match=20the=20literal=20string=20= that=20is=20the=20result=20from=20evaluating=20the=20Lisp=0A+expression=20= @var{expr}.=20=20The=20evaluation=20takes=20place=20at=20call=20time,=20= in=0A+the=20current=20lexical=20environment.=0A+=0A+@item=20(regexp=20= @var{expr})=0A+@cindex=20@code{regexp}=20in=20rx=0A+@itemx=20(regex=20= @var{expr})=0A+@cindex=20@code{regex}=20in=20rx=0A+Match=20the=20string=20= regexp=20that=20is=20the=20result=20from=20evaluating=20the=20Lisp=0A= +expression=20@var{expr}.=20=20The=20evaluation=20takes=20place=20at=20= call=20time,=20in=0A+the=20current=20lexical=20environment.=0A+=0A+@item=20= (eval=20@var{expr})=0A+@cindex=20@code{eval}=20in=20rx=0A+Match=20the=20= rx=20form=20that=20is=20the=20result=20from=20evaluating=20the=20Lisp=0A= +expression=20@var{expr}.=20=20The=20evaluation=20takes=20place=20at=20= macro-expansion=0A+time=20for=20@code{rx},=20at=20call=20time=20for=20= @code{rx-to-string},=0A+in=20the=20current=20global=20environment.=0A= +@end=20table=0A+=0A+@node=20Rx=20Functions=0A+@subsubsection=20= Functions=20and=20macros=20using=20@code{rx}=20regexps=0A+=0A+@defmac=20= rx=20rx-expr@dots{}=0A+Translate=20the=20@var{rx-expr}s=20to=20a=20= string=20regexp,=20as=20if=20they=20were=20the=0A+body=20of=20a=20= @code{(seq=20@dots{})}=20form.=20=20The=20@code{rx}=20macro=20expands=20= to=20a=0A+string=20constant,=20or,=20if=20@code{literal}=20or=20= @code{regexp}=20forms=20are=0A+used,=20a=20Lisp=20expression=20that=20= evaluates=20to=20a=20string.=0A+@end=20defmac=0A+=0A+@defun=20= rx-to-string=20rx-expr=20&optional=20no-group=0A+Translate=20= @var{rx-expr}=20to=20a=20string=20regexp=20which=20is=20returned.=0A+If=20= @var{no-group}=20is=20absent=20or=20nil,=20bracket=20the=20result=20in=20= a=0A+non-capturing=20group,=20@samp{\(?:@dots{}\)},=20if=20necessary=20= to=20ensure=20that=0A+a=20postfix=20operator=20appended=20to=20it=20will=20= apply=20to=20the=20whole=20expression.=0A+=0A+Arguments=20to=20= @code{literal}=20and=20@code{regexp}=20forms=20in=20@var{rx-expr}=0A= +must=20be=20string=20literals.=0A+@end=20defun=0A+=0A+The=20= @code{pcase}=20macro=20can=20use=20@code{rx}=20expressions=20as=20= patterns=0A+directly;=20@pxref{rx=20in=20pcase}.=0A+@end=20ifnottex=0A+=0A= =20@node=20Regexp=20Functions=0A=20@subsection=20Regular=20Expression=20= Functions=0A=20=0A--=20=0A2.20.1=20(Apple=20Git-117)=0A=0A= --Apple-Mail=_4EE8477A-8B77-4C86-A6A0-ED3F0D46DD21 Content-Disposition: attachment; filename=0001-Shorter-rx-doc-string-bug-36496.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-Shorter-rx-doc-string-bug-36496.patch" Content-Transfer-Encoding: quoted-printable =46rom=2048b2baa78e62a97ca2d621c5be643e6b539d78bf=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20=3D?UTF-8?q?Mattias=3D20Engdeg=3DC3=3DA5rd?=3D=20= =0ADate:=20Sat,=206=20Jul=202019=2013:22:15=20+0200=0A= Subject:=20[PATCH]=20Shorter=20`rx'=20doc=20string=20(bug#36496)=0A=0A*=20= lisp/emacs-lisp/rx.el=20(rx):=20Replace=20long=20description=20with=20a=20= condensed=0Asummary=20of=20the=20rx=20syntax,=20with=20reference=20to=20= the=20manual=20section.=0A---=0A=20lisp/emacs-lisp/rx.el=20|=20416=20= ++++++++++--------------------------------=0A=201=20file=20changed,=2095=20= insertions(+),=20321=20deletions(-)=0A=0Adiff=20--git=20= a/lisp/emacs-lisp/rx.el=20b/lisp/emacs-lisp/rx.el=0Aindex=20= 24dd6cbf1d..e65460c39d=20100644=0A---=20a/lisp/emacs-lisp/rx.el=0A+++=20= b/lisp/emacs-lisp/rx.el=0A@@=20-959,327=20+959,101=20@@=20rx-to-string=0A= =20;;;###autoload=0A=20(defmacro=20rx=20(&rest=20regexps)=0A=20=20=20= "Translate=20regular=20expressions=20REGEXPS=20in=20sexp=20form=20to=20a=20= regexp=20string.=0A-REGEXPS=20is=20a=20non-empty=20sequence=20of=20forms=20= of=20the=20sort=20listed=20below.=0A-=0A-Note=20that=20`rx'=20is=20a=20= Lisp=20macro;=20when=20used=20in=20a=20Lisp=20program=20being=0A= -compiled,=20the=20translation=20is=20performed=20by=20the=20compiler.=20= =20The=0A-`literal'=20and=20`regexp'=20forms=20accept=20subforms=20that=20= will=20evaluate=0A-to=20strings,=20in=20addition=20to=20constant=20= strings.=20=20If=20REGEXPS=20include=0A-such=20forms,=20then=20the=20= result=20is=20an=20expression=20which=20returns=20a=0A-regexp=20string,=20= rather=20than=20a=20regexp=20string=20directly.=20=20See=0A= -`rx-to-string'=20for=20performing=20translation=20completely=20at=20run=20= time.=0A-=0A-The=20following=20are=20valid=20subforms=20of=20regular=20= expressions=20in=20sexp=0A-notation.=0A-=0A-STRING=0A-=20=20=20=20=20= matches=20string=20STRING=20literally.=0A-=0A-CHAR=0A-=20=20=20=20=20= matches=20character=20CHAR=20literally.=0A-=0A-`not-newline',=20`nonl'=0A= -=20=20=20=20=20matches=20any=20character=20except=20a=20newline.=0A-=0A= -`anything'=0A-=20=20=20=20=20matches=20any=20character=0A-=0A-`(any=20= SET=20...)'=0A-`(in=20SET=20...)'=0A-`(char=20SET=20...)'=0A-=20=20=20=20= =20matches=20any=20character=20in=20SET=20....=20=20SET=20may=20be=20a=20= character=20or=20string.=0A-=20=20=20=20=20Ranges=20of=20characters=20= can=20be=20specified=20as=20`A-Z'=20in=20strings.=0A-=20=20=20=20=20= Ranges=20may=20also=20be=20specified=20as=20conses=20like=20`(?A=20.=20= ?Z)'.=0A-=20=20=20=20=20Reversed=20ranges=20like=20`Z-A'=20and=20`(?Z=20= .=20?A)'=20are=20not=20permitted.=0A-=0A-=20=20=20=20=20SET=20may=20also=20= be=20the=20name=20of=20a=20character=20class:=20`digit',=0A-=20=20=20=20=20= `control',=20`hex-digit',=20`blank',=20`graph',=20`print',=20`alnum',=0A= -=20=20=20=20=20`alpha',=20`ascii',=20`nonascii',=20`lower',=20`punct',=20= `space',=20`upper',=0A-=20=20=20=20=20`word',=20or=20one=20of=20their=20= synonyms.=0A-=0A-`(not=20(any=20SET=20...))'=0A-=20=20=20=20=20matches=20= any=20character=20not=20in=20SET=20...=0A-=0A-`line-start',=20`bol'=0A-=20= =20=20=20=20matches=20the=20empty=20string,=20but=20only=20at=20the=20= beginning=20of=20a=20line=0A-=20=20=20=20=20in=20the=20text=20being=20= matched=0A-=0A-`line-end',=20`eol'=0A-=20=20=20=20=20is=20similar=20to=20= `line-start'=20but=20matches=20only=20at=20the=20end=20of=20a=20line=0A-=0A= -`string-start',=20`bos',=20`bot'=0A-=20=20=20=20=20matches=20the=20= empty=20string,=20but=20only=20at=20the=20beginning=20of=20the=0A-=20=20=20= =20=20string=20being=20matched=20against.=0A-=0A-`string-end',=20`eos',=20= `eot'=0A-=20=20=20=20=20matches=20the=20empty=20string,=20but=20only=20= at=20the=20end=20of=20the=0A-=20=20=20=20=20string=20being=20matched=20= against.=0A-=0A-`buffer-start'=0A-=20=20=20=20=20matches=20the=20empty=20= string,=20but=20only=20at=20the=20beginning=20of=20the=0A-=20=20=20=20=20= buffer=20being=20matched=20against.=20=20Actually=20equivalent=20to=20= `string-start'.=0A-=0A-`buffer-end'=0A-=20=20=20=20=20matches=20the=20= empty=20string,=20but=20only=20at=20the=20end=20of=20the=0A-=20=20=20=20=20= buffer=20being=20matched=20against.=20=20Actually=20equivalent=20to=20= `string-end'.=0A-=0A-`point'=0A-=20=20=20=20=20matches=20the=20empty=20= string,=20but=20only=20at=20point.=0A-=0A-`word-start',=20`bow'=0A-=20=20= =20=20=20matches=20the=20empty=20string,=20but=20only=20at=20the=20= beginning=20of=20a=20word.=0A-=0A-`word-end',=20`eow'=0A-=20=20=20=20=20= matches=20the=20empty=20string,=20but=20only=20at=20the=20end=20of=20a=20= word.=0A-=0A-`word-boundary'=0A-=20=20=20=20=20matches=20the=20empty=20= string,=20but=20only=20at=20the=20beginning=20or=20end=20of=20a=0A-=20=20= =20=20=20word.=0A-=0A-`(not=20word-boundary)'=0A-`not-word-boundary'=0A-=20= =20=20=20=20matches=20the=20empty=20string,=20but=20not=20at=20the=20= beginning=20or=20end=20of=20a=0A-=20=20=20=20=20word.=0A-=0A= -`symbol-start'=0A-=20=20=20=20=20matches=20the=20empty=20string,=20but=20= only=20at=20the=20beginning=20of=20a=20symbol.=0A-=0A-`symbol-end'=0A-=20= =20=20=20=20matches=20the=20empty=20string,=20but=20only=20at=20the=20= end=20of=20a=20symbol.=0A-=0A-`digit',=20`numeric',=20`num'=0A-=20=20=20=20= =20matches=200=20through=209.=0A-=0A-`control',=20`cntrl'=0A-=20=20=20=20= =20matches=20any=20character=20whose=20code=20is=20in=20the=20range=20= 0-31.=0A-=0A-`hex-digit',=20`hex',=20`xdigit'=0A-=20=20=20=20=20matches=20= 0=20through=209,=20a=20through=20f=20and=20A=20through=20F.=0A-=0A= -`blank'=0A-=20=20=20=20=20matches=20horizontal=20whitespace,=20as=20= defined=20by=20Annex=20C=20of=20the=0A-=20=20=20=20=20Unicode=20= Technical=20Standard=20#18.=20=20In=20particular,=20it=20matches=0A-=20=20= =20=20=20spaces,=20tabs,=20and=20other=20characters=20whose=20Unicode=0A= -=20=20=20=20=20`general-category'=20property=20indicates=20they=20are=20= spacing=0A-=20=20=20=20=20separators.=0A-=0A-`graphic',=20`graph'=0A-=20=20= =20=20=20matches=20graphic=20characters--everything=20except=20= whitespace,=20ASCII=0A-=20=20=20=20=20and=20non-ASCII=20control=20= characters,=20surrogates,=20and=20codepoints=0A-=20=20=20=20=20= unassigned=20by=20Unicode.=0A-=0A-`printing',=20`print'=0A-=20=20=20=20=20= matches=20whitespace=20and=20graphic=20characters.=0A-=0A= -`alphanumeric',=20`alnum'=0A-=20=20=20=20=20matches=20alphabetic=20= characters=20and=20digits.=20=20For=20multibyte=20characters,=0A-=20=20=20= =20=20it=20matches=20characters=20whose=20Unicode=20`general-category'=20= property=0A-=20=20=20=20=20indicates=20they=20are=20alphabetic=20or=20= decimal=20number=20characters.=0A-=0A-`letter',=20`alphabetic',=20= `alpha'=0A-=20=20=20=20=20matches=20alphabetic=20characters.=20=20For=20= multibyte=20characters,=0A-=20=20=20=20=20it=20matches=20characters=20= whose=20Unicode=20`general-category'=20property=0A-=20=20=20=20=20= indicates=20they=20are=20alphabetic=20characters.=0A-=0A-`ascii'=0A-=20=20= =20=20=20matches=20ASCII=20(unibyte)=20characters.=0A-=0A-`nonascii'=0A-=20= =20=20=20=20matches=20non-ASCII=20(multibyte)=20characters.=0A-=0A= -`lower',=20`lower-case'=0A-=20=20=20=20=20matches=20anything=20= lower-case,=20as=20determined=20by=20the=20current=20case=0A-=20=20=20=20= =20table.=20=20If=20`case-fold-search'=20is=20non-nil,=20this=20also=20= matches=20any=0A-=20=20=20=20=20upper-case=20letter.=0A-=0A-`upper',=20= `upper-case'=0A-=20=20=20=20=20matches=20anything=20upper-case,=20as=20= determined=20by=20the=20current=20case=0A-=20=20=20=20=20table.=20=20If=20= `case-fold-search'=20is=20non-nil,=20this=20also=20matches=20any=0A-=20=20= =20=20=20lower-case=20letter.=0A-=0A-`punctuation',=20`punct'=0A-=20=20=20= =20=20matches=20punctuation.=20=20(But=20at=20present,=20for=20multibyte=20= characters,=0A-=20=20=20=20=20it=20matches=20anything=20that=20has=20= non-word=20syntax.)=0A-=0A-`space',=20`whitespace',=20`white'=0A-=20=20=20= =20=20matches=20anything=20that=20has=20whitespace=20syntax.=0A-=0A= -`word',=20`wordchar'=0A-=20=20=20=20=20matches=20anything=20that=20has=20= word=20syntax.=0A-=0A-`not-wordchar'=0A-=20=20=20=20=20matches=20= anything=20that=20has=20non-word=20syntax.=0A-=0A-`(syntax=20SYNTAX)'=0A= -=20=20=20=20=20matches=20a=20character=20with=20syntax=20SYNTAX.=20=20= SYNTAX=20must=20be=20one=0A-=20=20=20=20=20of=20the=20following=20= symbols,=20or=20a=20symbol=20corresponding=20to=20the=20syntax=0A-=20=20=20= =20=20character,=20e.g.=20`\\.'=20for=20`\\s.'.=0A-=0A-=20=20=20=20=20= `whitespace'=09=09(\\s-=20in=20string=20notation)=0A-=20=20=20=20=20= `punctuation'=09=09(\\s.)=0A-=20=20=20=20=20`word'=09=09=09(\\sw)=0A-=20=20= =20=20=20`symbol'=09=09=09(\\s_)=0A-=20=20=20=20=20`open-parenthesis'=09=09= (\\s()=0A-=20=20=20=20=20`close-parenthesis'=09(\\s))=0A-=20=20=20=20=20= `expression-prefix'=09(\\s')=0A-=20=20=20=20=20`string-quote'=09=09= (\\s\")=0A-=20=20=20=20=20`paired-delimiter'=09=09(\\s$)=0A-=20=20=20=20=20= `escape'=09=09=09(\\s\\)=0A-=20=20=20=20=20`character-quote'=09=09(\\s/)=0A= -=20=20=20=20=20`comment-start'=09=09(\\s<)=0A-=20=20=20=20=20= `comment-end'=09=09(\\s>)=0A-=20=20=20=20=20`string-delimiter'=09=09= (\\s|)=0A-=20=20=20=20=20`comment-delimiter'=09(\\s!)=0A-=0A-`(not=20= (syntax=20SYNTAX))'=0A-=20=20=20=20=20matches=20a=20character=20that=20= doesn't=20have=20syntax=20SYNTAX.=0A-=0A-`(category=20CATEGORY)'=0A-=20=20= =20=20=20matches=20a=20character=20with=20category=20CATEGORY.=20=20= CATEGORY=20must=20be=0A-=20=20=20=20=20either=20a=20character=20to=20use=20= for=20C,=20or=20one=20of=20the=20following=20symbols.=0A-=0A-=20=20=20=20= =20`space-for-indent'=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (\\c\\s=20in=20string=20notation)=0A-=20=20=20=20=20`base'=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (\\c.)=0A-=20=20=20=20=20`consonant'=09=09=09(\\c0)=0A-=20=20=20=20=20= `base-vowel'=09=09=09(\\c1)=0A-=20=20=20=20=20`upper-diacritical-mark'=09= =09(\\c2)=0A-=20=20=20=20=20`lower-diacritical-mark'=09=09(\\c3)=0A-=20=20= =20=20=20`tone-mark'=09=09=20=20=20=20=20=20=20=20(\\c4)=0A-=20=20=20=20=20= `symbol'=09=09=09=20=20=20=20=20=20=20=20(\\c5)=0A-=20=20=20=20=20= `digit'=09=09=09=20=20=20=20=20=20=20=20(\\c6)=0A-=20=20=20=20=20= `vowel-modifying-diacritical-mark'=09(\\c7)=0A-=20=20=20=20=20= `vowel-sign'=09=09=09(\\c8)=0A-=20=20=20=20=20`semivowel-lower'=09=09=09= (\\c9)=0A-=20=20=20=20=20`not-at-end-of-line'=09=09(\\c<)=0A-=20=20=20=20= =20`not-at-beginning-of-line'=09=09(\\c>)=0A-=20=20=20=20=20= `alpha-numeric-two-byte'=09=09(\\cA)=0A-=20=20=20=20=20= `chinese-two-byte'=09=09=09(\\cC)=0A-=20=20=20=20=20`greek-two-byte'=09=09= =09(\\cG)=0A-=20=20=20=20=20`japanese-hiragana-two-byte'=09(\\cH)=0A-=20=20= =20=20=20`indian-two-byte'=09=09=09(\\cI)=0A-=20=20=20=20=20= `japanese-katakana-two-byte'=09(\\cK)=0A-=20=20=20=20=20= `strong-left-to-right'=20=20=20=20=20=20=20=20=20=20=20=20=20(\\cL)=0A-=20= =20=20=20=20`korean-hangul-two-byte'=09=09(\\cN)=0A-=20=20=20=20=20= `strong-right-to-left'=20=20=20=20=20=20=20=20=20=20=20=20=20(\\cR)=0A-=20= =20=20=20=20`cyrillic-two-byte'=09=09(\\cY)=0A-=20=20=20=20=20= `combining-diacritic'=09=09(\\c^)=0A-=20=20=20=20=20`ascii'=09=09=09=09= (\\ca)=0A-=20=20=20=20=20`arabic'=09=09=09=09(\\cb)=0A-=20=20=20=20=20= `chinese'=09=09=09=09(\\cc)=0A-=20=20=20=20=20`ethiopic'=09=09=09=09= (\\ce)=0A-=20=20=20=20=20`greek'=09=09=09=09(\\cg)=0A-=20=20=20=20=20= `korean'=09=09=09=09(\\ch)=0A-=20=20=20=20=20`indian'=09=09=09=09(\\ci)=0A= -=20=20=20=20=20`japanese'=09=09=09=09(\\cj)=0A-=20=20=20=20=20= `japanese-katakana'=09=09(\\ck)=0A-=20=20=20=20=20`latin'=09=09=09=09= (\\cl)=0A-=20=20=20=20=20`lao'=09=09=09=09(\\co)=0A-=20=20=20=20=20= `tibetan'=09=09=09=09(\\cq)=0A-=20=20=20=20=20`japanese-roman'=09=09=09= (\\cr)=0A-=20=20=20=20=20`thai'=09=09=09=09(\\ct)=0A-=20=20=20=20=20= `vietnamese'=09=09=09(\\cv)=0A-=20=20=20=20=20`hebrew'=09=09=09=09(\\cw)=0A= -=20=20=20=20=20`cyrillic'=09=09=09=09(\\cy)=0A-=20=20=20=20=20= `can-break'=09=09=09(\\c|)=0A-=0A-`(not=20(category=20CATEGORY))'=0A-=20=20= =20=20=20matches=20a=20character=20that=20doesn't=20have=20category=20= CATEGORY.=0A-=0A-`(and=20SEXP1=20SEXP2=20...)'=0A-`(:=20SEXP1=20SEXP2=20= ...)'=0A-`(seq=20SEXP1=20SEXP2=20...)'=0A-`(sequence=20SEXP1=20SEXP2=20= ...)'=0A-=20=20=20=20=20matches=20what=20SEXP1=20matches,=20followed=20= by=20what=20SEXP2=20matches,=20etc.=0A-=20=20=20=20=20Without=20= arguments,=20matches=20the=20empty=20string.=0A-=0A-`(submatch=20SEXP1=20= SEXP2=20...)'=0A-`(group=20SEXP1=20SEXP2=20...)'=0A-=20=20=20=20=20like=20= `and',=20but=20makes=20the=20match=20accessible=20with=20`match-end',=0A= -=20=20=20=20=20`match-beginning',=20and=20`match-string'.=0A-=0A= -`(submatch-n=20N=20SEXP1=20SEXP2=20...)'=0A-`(group-n=20N=20SEXP1=20= SEXP2=20...)'=0A-=20=20=20=20=20like=20`group',=20but=20make=20it=20an=20= explicitly-numbered=20group=20with=0A-=20=20=20=20=20group=20number=20N.=0A= -=0A-`(or=20SEXP1=20SEXP2=20...)'=0A-`(|=20SEXP1=20SEXP2=20...)'=0A-=20=20= =20=20=20matches=20anything=20that=20matches=20SEXP1=20or=20SEXP2,=20= etc.=20=20If=20all=0A-=20=20=20=20=20args=20are=20strings,=20use=20= `regexp-opt'=20to=20optimize=20the=20resulting=0A-=20=20=20=20=20regular=20= expression.=20=20Without=20arguments,=20never=20matches=20anything.=0A-=0A= -`(minimal-match=20SEXP)'=0A-=20=20=20=20=20produce=20a=20non-greedy=20= regexp=20for=20SEXP.=20=20Normally,=20regexps=20matching=0A-=20=20=20=20=20= zero=20or=20more=20occurrences=20of=20something=20are=20\"greedy\"=20in=20= that=20they=0A-=20=20=20=20=20match=20as=20much=20as=20they=20can,=20as=20= long=20as=20the=20overall=20regexp=20can=0A-=20=20=20=20=20still=20= match.=20=20A=20non-greedy=20regexp=20matches=20as=20little=20as=20= possible.=0A-=0A-`(maximal-match=20SEXP)'=0A-=20=20=20=20=20produce=20a=20= greedy=20regexp=20for=20SEXP.=20=20This=20is=20the=20default.=0A-=0A= -Below,=20`SEXP=20...'=20represents=20a=20sequence=20of=20regexp=20= forms,=20treated=20as=20if=0A-enclosed=20in=20`(and=20...)'.=0A-=0A= -`(zero-or-more=20SEXP=20...)'=0A-`(0+=20SEXP=20...)'=0A-=20=20=20=20=20= matches=20zero=20or=20more=20occurrences=20of=20what=20SEXP=20...=20= matches.=0A-=0A-`(*=20SEXP=20...)'=0A-=20=20=20=20=20like=20= `zero-or-more',=20but=20always=20produces=20a=20greedy=20regexp,=20= independent=0A-=20=20=20=20=20of=20`rx-greedy-flag'.=0A-=0A-`(*?=20SEXP=20= ...)'=0A-=20=20=20=20=20like=20`zero-or-more',=20but=20always=20produces=20= a=20non-greedy=20regexp,=0A-=20=20=20=20=20independent=20of=20= `rx-greedy-flag'.=0A-=0A-`(one-or-more=20SEXP=20...)'=0A-`(1+=20SEXP=20= ...)'=0A-=20=20=20=20=20matches=20one=20or=20more=20occurrences=20of=20= SEXP=20...=0A-=0A-`(+=20SEXP=20...)'=0A-=20=20=20=20=20like=20= `one-or-more',=20but=20always=20produces=20a=20greedy=20regexp.=0A-=0A= -`(+?=20SEXP=20...)'=0A-=20=20=20=20=20like=20`one-or-more',=20but=20= always=20produces=20a=20non-greedy=20regexp.=0A-=0A-`(zero-or-one=20SEXP=20= ...)'=0A-`(optional=20SEXP=20...)'=0A-`(opt=20SEXP=20...)'=0A-=20=20=20=20= =20matches=20zero=20or=20one=20occurrences=20of=20A.=0A-=0A-`(?=20SEXP=20= ...)'=0A-=20=20=20=20=20like=20`zero-or-one',=20but=20always=20produces=20= a=20greedy=20regexp.=0A-=0A-`(??=20SEXP=20...)'=0A-=20=20=20=20=20like=20= `zero-or-one',=20but=20always=20produces=20a=20non-greedy=20regexp.=0A-=0A= -`(repeat=20N=20SEXP)'=0A-`(=3D=20N=20SEXP=20...)'=0A-=20=20=20=20=20= matches=20N=20occurrences.=0A-=0A-`(>=3D=20N=20SEXP=20...)'=0A-=20=20=20=20= =20matches=20N=20or=20more=20occurrences.=0A-=0A-`(repeat=20N=20M=20= SEXP)'=0A-`(**=20N=20M=20SEXP=20...)'=0A-=20=20=20=20=20matches=20N=20to=20= M=20occurrences.=0A-=0A-`(backref=20N)'=0A-=20=20=20=20=20matches=20what=20= was=20matched=20previously=20by=20submatch=20N.=0A-=0A-`(literal=20= STRING-EXPR)'=0A-=20=20=20=20=20matches=20STRING-EXPR=20literally,=20= where=20STRING-EXPR=20is=20any=20lisp=0A-=20=20=20=20=20expression=20= that=20evaluates=20to=20a=20string.=0A-=0A-`(regexp=20REGEXP-EXPR)'=0A-=20= =20=20=20=20include=20REGEXP-EXPR=20in=20string=20notation=20in=20the=20= result,=20where=0A-=20=20=20=20=20REGEXP-EXPR=20is=20any=20lisp=20= expression=20that=20evaluates=20to=20a=0A-=20=20=20=20=20string=20= containing=20a=20valid=20regexp.=0A-=0A-`(eval=20FORM)'=0A-=20=20=20=20=20= evaluate=20FORM=20and=20insert=20result.=20=20If=20result=20is=20a=20= string,=0A-=20=20=20=20=20`regexp-quote'=20it.=20=20Note=20that=20FORM=20= is=20evaluated=20during=0A-=20=20=20=20=20macroexpansion."=0A+Each=20= argument=20is=20one=20of=20the=20forms=20below;=20RX=20is=20a=20subform,=20= and=20RX...=20stands=0A+for=20one=20or=20more=20RXs.=20=20For=20details,=20= see=20Info=20node=20`(elisp)=20Rx=20Notation'.=0A+See=20`rx-to-string'=20= for=20the=20corresponding=20function.=0A+=0A+STRING=20=20=20=20=20=20=20=20= =20Match=20a=20literal=20string.=0A+CHAR=20=20=20=20=20=20=20=20=20=20=20= Match=20a=20literal=20character.=0A+=0A+(seq=20RX...)=20=20=20=20Match=20= the=20RXs=20in=20sequence.=20=20Alias:=20:,=20sequence,=20and=0A+(or=20= RX...)=20=20=20=20=20Match=20one=20of=20the=20RXs.=20=20Alias:=20|=0A+=0A= +(zero-or-more=20RX...)=20Match=20RXs=20zero=20or=20more=20times.=20=20= Alias:=20*,=200+=0A+(one-or-more=20RX...)=20=20Match=20RXs=20one=20or=20= more=20times.=20=20Alias:=20+,=201+=0A+(zero-or-one=20RX...)=20=20Match=20= RXs=20or=20the=20empty=20string.=20=20Alias:=20?,=20opt,=20optional=0A= +(*?=20RX...)=20=20=20=20=20=20Match=20RXs=20zero=20or=20more=20times,=20= non-greedily.=0A+(+?=20RX...)=20=20=20=20=20=20Match=20RXs=20one=20or=20= more=20times,=20non-greedily.=0A+(??=20RX...)=20=20=20=20=20=20Match=20= RXs=20or=20the=20empty=20string,=20non-greedily.=0A+(=3D=20N=20RX...)=20=20= =20=20=20Match=20RXs=20exactly=20N=20times.=0A+(>=3D=20N=20RX...)=20=20=20= =20Match=20RXs=20N=20or=20more=20times.=0A+(**=20N=20M=20RX...)=20=20= Match=20RXs=20N=20to=20M=20times.=20=20Alias:=20repeat=0A+(minimal-match=20= RX)=20=20Match=20RX,=20with=20zero-or-more,=20one-or-more,=0A+=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20zero-or-one,=200+,=201+,=20opt,=20= and=20optional=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20using=20= non-greedy=20matching.=0A+(maximal-match=20RX)=20=20Match=20RX,=20with=20= zero-or-more,=20one-or-more,=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20zero-or-one,=200+,=201+,=20opt,=20and=20optional=0A+=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20using=20greedy=20matching,=20which=20is=20= the=20default.=0A+=0A+(any=20SET...)=20=20=20=20Match=20a=20character=20= from=20one=20of=20the=20SETs.=20=20Each=20SET=20is=20a=0A+=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20character,=20a=20string,=20a=20range=20= as=20string=20\"A-Z\"=20or=20cons=0A+=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20(?A=20.=20?Z),=20or=20a=20character=20class=20(see=20below).=20= =20Alias:=20in,=20char=0A+(not=20CHARSPEC)=20=20Match=20one=20character=20= not=20matched=20by=20CHARSPEC.=20=20CHARSPEC=0A+=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20can=20be=20(any=20...),=20(syntax=20...),=20= (category=20...),=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20or=20= a=20character=20class.=0A+not-newline=20=20=20=20=20Match=20any=20= character=20except=20a=20newline.=20=20Alias:=20nonl=0A+anything=20=20=20= =20=20=20=20=20Match=20any=20character.=0A+=0A+CHARCLASS=20=20=20=20=20=20= =20Match=20a=20character=20from=20a=20character=20class.=20=20One=20of:=0A= +=20alpha,=20alphabetic,=20letter=20=20=20alphabetic=20characters=20= (defined=20by=20Unicode)=0A+=20alnum,=20alphanumeric=20=20=20=20=20=20=20= =20=20alphabetic=20or=20decimal=20digit=20chars=20(Unicode)=0A+=20digit=20= numeric,=20num=20=20=20=20=20=20=20=20=20=200-9=0A+=20xdigit,=20= hex-digit,=20hex=20=20=20=20=20=200-9,=20A-F,=20a-f=0A+=20cntrl,=20= control=20=20=20=20=20=20=20=20=20=20=20=20=20=20ASCII=20codes=200-31=0A= +=20blank=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20horizontal=20whitespace=20(Unicode)=0A+=20space,=20whitespace,=20= white=20=20=20=20chars=20with=20whitespace=20syntax=0A+=20lower,=20= lower-case=20=20=20=20=20=20=20=20=20=20=20lower-case=20chars,=20from=20= current=20case=20table=0A+=20upper,=20upper-case=20=20=20=20=20=20=20=20=20= =20=20upper-case=20chars,=20from=20current=20case=20table=0A+=20graph,=20= graphic=20=20=20=20=20=20=20=20=20=20=20=20=20=20graphic=20characters=20= (Unicode)=0A+=20print,=20printing=20=20=20=20=20=20=20=20=20=20=20=20=20= whitespace=20or=20graphic=20(Unicode)=0A+=20punct,=20punctuation=20=20=20= =20=20=20=20=20=20=20not=20control,=20space,=20letter=20or=20digit=20= (ASCII);=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20not=20word=20syntax=20(non-ASCII)=0A+=20word,=20= wordchar=20=20=20=20=20=20=20=20=20=20=20=20=20=20characters=20with=20= word=20syntax=0A+=20ascii=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20ASCII=20characters=20(codes=200-127)=0A+=20nonascii=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20non-ASCII=20= characters=20(but=20not=20raw=20bytes)=0A+=0A+(syntax=20SYNTAX)=20=20= Match=20a=20character=20with=20syntax=20SYNTAX,=20being=20one=20of:=0A+=20= =20whitespace,=20punctuation,=20word,=20symbol,=20open-parenthesis,=0A+=20= =20close-parenthesis,=20expression-prefix,=20string-quote,=0A+=20=20= paired-delimiter,=20escape,=20character-quote,=20comment-start,=0A+=20=20= comment-end,=20string-delimiter,=20comment-delimiter=0A+=0A+(category=20= CAT)=20=20=20Match=20a=20character=20in=20category=20CAT,=20being=20one=20= of:=0A+=20=20space-for-indent,=20base,=20consonant,=20base-vowel,=0A+=20=20= upper-diacritical-mark,=20lower-diacritical-mark,=20tone-mark,=20symbol,=0A= +=20=20digit,=20vowel-modifying-diacritical-mark,=20vowel-sign,=0A+=20=20= semivowel-lower,=20not-at-end-of-line,=20not-at-beginning-of-line,=0A+=20= =20alpha-numeric-two-byte,=20chinese-two-byte,=20greek-two-byte,=0A+=20=20= japanese-hiragana-two-byte,=20indian-two-byte,=0A+=20=20= japanese-katakana-two-byte,=20strong-left-to-right,=0A+=20=20= korean-hangul-two-byte,=20strong-right-to-left,=20cyrillic-two-byte,=0A+=20= =20combining-diacritic,=20ascii,=20arabic,=20chinese,=20ethiopic,=20= greek,=0A+=20=20korean,=20indian,=20japanese,=20japanese-katakana,=20= latin,=20lao,=0A+=20=20tibetan,=20japanese-roman,=20thai,=20vietnamese,=20= hebrew,=20cyrillic,=0A+=20=20can-break=0A+=0A+Zero-width=20assertions:=20= these=20all=20match=20the=20empty=20string=20in=20specific=20places.=0A+=20= line-start=20=20=20=20=20=20=20=20=20at=20the=20beginning=20of=20a=20= line.=20=20Alias:=20bol=0A+=20line-end=20=20=20=20=20=20=20=20=20=20=20= at=20the=20end=20of=20a=20line.=20=20Alias:=20eol=0A+=20string-start=20=20= =20=20=20=20=20at=20the=20start=20of=20the=20string=20or=20buffer.=0A+=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20Alias:=20= buffer-start,=20bos,=20bot=0A+=20string-end=20=20=20=20=20=20=20=20=20at=20= the=20end=20of=20the=20string=20or=20buffer.=0A+=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20Alias:=20buffer-end,=20eos,=20eot=0A= +=20point=20=20=20=20=20=20=20=20=20=20=20=20=20=20at=20point.=0A+=20= word-start=20=20=20=20=20=20=20=20=20at=20the=20beginning=20of=20a=20= word.=0A+=20word-end=20=20=20=20=20=20=20=20=20=20=20at=20the=20end=20of=20= a=20word.=0A+=20word-boundary=20=20=20=20=20=20at=20the=20beginning=20or=20= end=20of=20a=20word.=0A+=20not-word-boundary=20=20not=20at=20the=20= beginning=20or=20end=20of=20a=20word.=0A+=20symbol-start=20=20=20=20=20=20= =20at=20the=20beginning=20of=20a=20symbol.=0A+=20symbol-end=20=20=20=20=20= =20=20=20=20at=20the=20end=20of=20a=20symbol.=0A+=0A+(group=20RX...)=20=20= Match=20RXs=20and=20define=20a=20capture=20group.=20=20Alias:=20submatch=0A= +(group-n=20N=20RX...)=20Match=20RXs=20and=20define=20capture=20group=20= N.=20=20Alias:=20submatch-n=0A+(backref=20N)=20=20=20=20Match=20the=20= text=20that=20capture=20group=20N=20matched.=0A+=0A+(literal=20EXPR)=20= Match=20the=20literal=20string=20from=20evaluating=20the=20EXPR=20at=20= run=20time.=0A+(regexp=20EXPR)=20=20Match=20the=20string=20regexp=20from=20= evaluating=20EXPR=20at=20run=20time.=0A+(eval=20EXPR)=20=20=20=20Match=20= the=20rx=20sexp=20from=20evaluating=20EXPR=20at=20compile=20time."=0A=20=20= =20(let*=20((rx--compile-to-lisp=20t)=0A=20=20=20=20=20=20=20=20=20=20= (re=20(cond=20((null=20regexps)=0A=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20(error=20"No=20regexp"))=0A--=20=0A2.20.1=20= (Apple=20Git-117)=0A=0A= --Apple-Mail=_4EE8477A-8B77-4C86-A6A0-ED3F0D46DD21--