From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 23527 invoked from network); 17 Sep 2021 08:59:51 -0000 Received: from minnie.tuhs.org (45.79.103.53) by inbox.vuxu.org with ESMTPUTF8; 17 Sep 2021 08:59:51 -0000 Received: by minnie.tuhs.org (Postfix, from userid 112) id 6B9249CAD3; Fri, 17 Sep 2021 18:59:48 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id 5A5059CAB5; Fri, 17 Sep 2021 18:59:15 +1000 (AEST) Received: by minnie.tuhs.org (Postfix, from userid 112) id A76E19CAB3; Fri, 17 Sep 2021 18:59:11 +1000 (AEST) X-Greylist: delayed 429 seconds by postgrey-1.36 at minnie.tuhs.org; Fri, 17 Sep 2021 18:59:11 AEST Received: from marmaro.de (marmaro.de [176.28.23.198]) by minnie.tuhs.org (Postfix) with ESMTP id 1B7B59CAB2 for ; Fri, 17 Sep 2021 18:59:10 +1000 (AEST) Received: by marmaro.de (masqmail 0.3.6-dev, from userid 1000) id 1mR9bE-8RG-00 for ; Fri, 17 Sep 2021 10:52:00 +0200 To: tuhs@minnie.tuhs.org User-Agent: meillo's mail handler (mmh) X-License: CC0 (http://marmaro.de/rights) MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <32441.1631868720.1@marmaro.de> Date: Fri, 17 Sep 2021 10:52:00 +0200 From: markus schnalke Message-ID: <1mR9bE-8RG-00@marmaro.de> Subject: [TUHS] RegExp decision for meta characters: Circumflex X-BeenThere: tuhs@minnie.tuhs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: The Unix Heritage Society mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: tuhs-bounces@minnie.tuhs.org Sender: "TUHS" Hoi, I'm interested in the early design decisions for meta characters in REs, mainly regarding Ken's RE implementation in ed. Two questions: 1) Circumflex As far as I see, the circumflex (^) is the only meta character that has two different special meanings in REs: First being the beginning of line anchor and second inverting a character class. Why was it chosen for the second one? Why not the exclamation mark in that case? (Sure, C didn't exist by then, but the bang probably was used to negate in other languages of the time, I think.) 2) Symbol for the end of line anchor What is the reason that the beginning of line and end of line anchors are different symbols? Is there a reason why not only one symbol, say the circumflex, was chosen to represent both? I currently see no disadvantages of such a design. (Circumflexes aren't likely to end lines of text, neither.) I would appreciate if you could help me understand these design decisions better. Maybe there existed RE notations that were simply copied ... meillo