Path: csiph.com!eternal-september.org!feeder.eternal-september.org!newsfeed.kamp.net!newsfeed.kamp.net!fu-berlin.de!uni-berlin.de!not-for-mail From: Tim Chase Newsgroups: comp.lang.python Subject: Re: What does =?UTF-8?B?4oCcZ3JlcOKAnQ==?= stand for? (was: Regular expressions) Date: Wed, 4 Nov 2015 13:05:48 -0600 Lines: 37 Message-ID: References: <662g3blobme52hfoududj27err185v2npm@4ax.com> <56397a18$0$11094$c3e8da3@news.astraweb.com> <85wptxk4ho.fsf_-_@benfinney.id.au> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: news.uni-berlin.de MZY0vySI3i0+WD4+WmZQeQzKgqflmEqRDsOMON69iBRA== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.050 X-Spam-Evidence: '*H*': 0.90; '*S*': 0.00; 'command.': 0.09; 'delimited': 0.09; '-tkc': 0.16; 'from:addr:python.list': 0.16; 'from:addr:tim.thechases.com': 0.16; 'from:name:tim chase': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'slashes': 0.16; 'subject:Regular': 0.16; 'subject:expressions': 0.16; 'wrote:': 0.16; 'changes': 0.20; '(the': 0.22; 'matching': 0.23; 'header:In- Reply-To:1': 0.24; "i've": 0.25; 'command': 0.26; 'issue,': 0.27; 'regular': 0.29; 'print': 0.30; 'another': 0.32; 'addresses': 0.32; 'operate': 0.32; 'common': 0.33; 'combination': 0.33; 'utility': 0.33; '(for': 0.34; 'so,': 0.35; 'behind': 0.35; 'text': 0.35; 'lines': 0.36; "wasn't": 0.36; 'to:addr:python- list': 0.36; 'subject:: ': 0.37; 'received:10': 0.37; 'wanted': 0.37; 'why': 0.39; 'to:addr:python.org': 0.40; 'entire': 0.61; 'default': 0.61; 'show': 0.62; 'therefore': 0.67; 'skip:\xe2 10': 0.70; 'subjectcharset:utf-8': 0.71; '8bit%:43': 0.72; 'goofball': 0.84; 'received:23': 0.84; 'remembering': 0.84 X-Sender-Id: wwwh|x-authuser|tim@thechases.com X-Sender-Id: wwwh|x-authuser|tim@thechases.com X-MC-Relay: Neutral X-MailChannels-SenderId: wwwh|x-authuser|tim@thechases.com X-MailChannels-Auth-Id: wwwh X-MC-Loop-Signature: 1446664029194:190192412 X-MC-Ingress-Time: 1446664029193 In-Reply-To: <85wptxk4ho.fsf_-_@benfinney.id.au> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; x86_64-pc-linux-gnu) X-AuthUser: tim@thechases.com X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:98238 On 2015-11-05 05:24, Ben Finney wrote: > A very common command to issue, then, is =E2=80=9Cactually show me the li= ne > of text I just specified=E2=80=9D; the =E2=80=98p=E2=80=99 (for =E2=80=9C= print=E2=80=9D) command. >=20 > Another very common command is =E2=80=9Cfind the text matching this patte= rn > and perform these commands on it=E2=80=9D, which is =E2=80=98g=E2=80=99 (= for =E2=80=9Cglobal=E2=80=9D). The > =E2=80=98g=E2=80=99 command addresses text matching a regular expression = pattern, > delimited by slashes =E2=80=98/=E2=80=99. >=20 > So, for users with feeble human brains incapable of remembering > perfectly the entire content of the text while it changes and > therefore not always knowing exactly which lines they wanted to > operate on without seeing them all the time, a very frequent > combination command is: >=20 > g/RE/p Though since the default action for g/ is to print the line, I've always wondered why the utility wasn't named just "gre" $ ed myfile.txt g/re [matching lines follow] q $ -tkc (the goofball behind https://twitter.com/ed1conf )