Path: utzoo!attcan!uunet!dg!dg-rtp.dg.com!blurie From: blurie@dg-rtp.dg.com (Benjamin Lurie) Newsgroups: comp.lang.perl Subject: Pattern Substitution Question Keywords: pattern Message-ID: <1086@dg.dg.com> Date: 26 Oct 90 18:19:13 GMT Sender: root@dg.dg.com Reply-To: blurie@einstein.webo.dg.com Organization: Data General Corporation, Westboro , MA Lines: 22 Here's a question, whose answer I'm sure is going to be trivial, that I've been trying to resolve for days. Given input like the following: Lurie;Benjamin;1212 Nowhere Road;(617) 923-0000;(w) (000) 202-2343 I would like to translate it to: Benjamin Lurie;1212 Nowhere Road;(617) 923-0000;(w) (000) 202-2343 I've tried a pattern match looking for a semi-colon, but I always get the longest pattern that matches, which would include everything up to the "(w)". What pattern substitution would accomplish what I want here? And, in general, how would I specify to match only the input up to the first ocurrance of , where is some specific character? =============================================================================== Benjamin Lurie blurie@einstein.webo.dg.com Data General Westboro, Mass ===============================================================================