🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.emacs
Article #3403

regular expression alternatives

#3403
From: John R. Dennis
Date: Sat, 25 May 1991 13:40
10 lines
799 bytes
I would like to search for a number of possible regexps with one
regular expression search. Then identify which regexp alternative was
matched by testing the (match-beginning n) for nil. For example

(re-search-forward "\\(foo\\)\\|\\
-- 
John Dennis

================================================================================
Graphics Software, PEX Project Leader
Technical Details
Message-ID: <1991May25.134015.298@Stardent.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!spool.mu.edu!uwm.edu!psuvax1!hsdndev!husc6!genrad!stardent!johnd

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!spool.mu.edu!uwm.edu!psuvax1!hsdndev!husc6!genrad!stardent!johnd
From: johnd@Stardent.COM (John R. Dennis)
Newsgroups: comp.emacs
Subject: regular expression alternatives
Message-ID: <1991May25.134015.298@Stardent.COM>
Date: 25 May 91 13:40:15 GMT
Article-I.D.: Stardent.1991May25.134015.298
Organization: Stardent Computer, Concord MA
Lines: 10