From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27531 invoked by alias); 10 Jun 2014 05:04:28 -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: 18893 Received: (qmail 10839 invoked from network); 10 Jun 2014 05:04:27 -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=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ucsc.edu; s=ucsc-google; h=from:content-type:content-transfer-encoding:subject:message-id:date :to:mime-version; bh=679zZVobqihcablUn5imBeM3Y0uFiTOOWncdu7hscq8=; b=Ki9mjOGikVhCkKejdD7RYOy0FYXuoZkSuTfdy/tqIy+UXAX2/DC18j9K5wCnKb8QIg P+IbQD97yKblbQKfog9Oz7tylZTLmTUe1Palk9NirupToA6w+VcGeFyu6r7Apcbucu3P BqKYofAmQRCQzjxWLXW/Mt+GoQnqV4srA4zks= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:content-type:content-transfer-encoding :subject:message-id:date:to:mime-version; bh=679zZVobqihcablUn5imBeM3Y0uFiTOOWncdu7hscq8=; b=POiGzt2SuAxjGwLCvIKYJyZO2WmEKDW6i6B/Q7r+skJSpoIOcW6v2bB045wUWq1ESR Nfkw8XCiBliin0ZnwG59nMZWA2PMKGGN8HcDaDyoP/3cUui2O7uVxP5+UCUug+bsRNku uEGCL7J0NOKzAw1/8+MWSpLteiH1CE9xyYqKLjtOkb0A+vbQmjowL4si1NC/UvaKMpdO fjSwSAGuVh+kSvRzqze/2+DkttMeGajXfjEgQnJ1YI1I39rpOMNJZOWIjx58a3QNJ3kP 20G5YrwVVRx5mgrNPglUXr3Z9+8l7bVHoh1sw7mZOMwzbH5Hz096XwDOzH6pNsQ+a1ot CQUw== X-Gm-Message-State: ALoCoQlgWv8KUxsPN1ncv4j2dSmlFEKK5nz/BAWAJiaPh7XF/5xMHGDy7zj1qFWVunVcdr3j3rnc X-Received: by 10.69.25.105 with SMTP id ip9mr8556477pbd.145.1402376663374; Mon, 09 Jun 2014 22:04:23 -0700 (PDT) From: "William G. Scott" X-Google-Original-From: "William G. Scott" Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Subject: regular expressions and setting variables? Message-Id: <157E3510-D220-4C1C-A452-93DE96DA4363@chemistry.ucsc.edu> Date: Mon, 9 Jun 2014 22:04:20 -0700 To: zsh-users@zsh.org Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.2\)) X-Mailer: Apple Mail (2.1878.2) Hi folks: I=92m trying to emulate how iTunes changes some names of directories it = creates based on names of artists. For example, albums by the group = R.E.M. are stored in a directory it creates called R.E.M_ =20 The final full-stop is replaced with an underscore, I assume to avoid = complications in the unix filesystem. This works: JUNK=3DR.E.M. print ${JUNK}| perl -p -e 's|\.$|_|g=92 It returns R.E.M_ But if I try to do this: =20 print ${JUNK/\.$/_} =20 it returns =20 R.E.M. I assume I am not using the correct regexp. What do I need to do to get = this working? Thanks in advance. Bill Scott=