From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29568 invoked by alias); 1 Jul 2013 23:57:20 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 17843 Received: (qmail 26453 invoked from network); 1 Jul 2013 23:57:14 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS autolearn=ham version=3.3.2 Received-SPF: pass (ns1.primenet.com.au: SPF record at velocitynet.com.au designates 203.17.154.25 as permitted sender) References: Mime-Version: 1.0 (1.0) In-Reply-To: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Message-Id: <8B5FCBBB-DF52-43E1-8924-AAE08263D76F@goldweb.com.au> Cc: Zsh-Users List X-Mailer: iPad Mail (10B329) From: Alex Satrapa Subject: Re: input foo, output '[F|f][O|o][O|o]'? Date: Tue, 2 Jul 2013 09:51:22 +1000 To: TJ Luoma Since the topic is Regular Expressions, I will take the opportunity to recom= mend the O'Reilly book, "Mastering Regular Expressions" by Jeffrey Freidl. E= ven if you only work through the first few chapters (it provides examples fo= r you to play with and learn), it will be worth the investment. I am a very happy "student" (disciple, even) of Jeffrey Freidl's writing, an= d I have many O'Reilly books in my library. Alex Satrapa On 02/07/2013, at 3:59, "TJ Luoma" wrote: >=20 > Before I reinvent the wheel, I thought I'd ask if someone already had (or k= new of) a way to take a string of characters and output a 'case insensitive'= regex version. >=20 > For example, if I input 'CrashPlan' I'd want to get out [C|c][R|r][A|a][S|= s][H|h][P|p][L|l][A|a][N|n] >=20 > (Input will usually be ASCII letters, with an occasional number and perhap= s the occasional '-' or '_' but doesn't need to handle anything more complex= than that.) >=20 > I tried Google but found it pretty impossible to make a good query for som= ething like this. >=20 > TjL