From owner-freebsd-questions@FreeBSD.ORG Wed Mar 22 23:18:26 2006 Return-Path: X-Original-To: freebsd-questions@FreeBSD.ORG Delivered-To: freebsd-questions@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2303A16A400 for ; Wed, 22 Mar 2006 23:18:26 +0000 (UTC) (envelope-from kline@tao.thought.org) Received: from tao.thought.org (dsl231-043-140.sea1.dsl.speakeasy.net [216.231.43.140]) by mx1.FreeBSD.org (Postfix) with ESMTP id 960ED43D5F for ; Wed, 22 Mar 2006 23:18:25 +0000 (GMT) (envelope-from kline@tao.thought.org) Received: from tao.thought.org (localhost [127.0.0.1]) by tao.thought.org (8.13.4/8.13.1) with ESMTP id k2MNIOYS023577 for ; Wed, 22 Mar 2006 15:18:24 -0800 (PST) (envelope-from kline@tao.thought.org) Received: (from kline@localhost) by tao.thought.org (8.13.4/8.13.1/Submit) id k2MNIOZv023576 for freebsd-questions@FreeBSD.ORG; Wed, 22 Mar 2006 15:18:24 -0800 (PST) (envelope-from kline) Date: Wed, 22 Mar 2006 15:18:23 -0800 From: Gary Kline To: FreeBSD Mailing List Message-ID: <20060322231823.GA23486@thought.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i X-Organization: Thought Unlimited. Public service Unix since 1986. X-Of_Interest: Observing 19+ years of service to the Unix community Cc: Subject: perl regex help request... . X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Mar 2006 23:18:26 -0000 Guys, perlmonks was helpful in explaining that "[[](\d+)[]]" is what is required to match [NN]. So that will catch the footnote numbers. I had thought that I would have to do the NN xyz anchor by hand. Maybe not, if somebody can clue me in on the perl regex for matching "NN plus any/every character following until \n" I can't find my regex book, and am not exactly clear if this will work, but if I go back over my files and insert braces around each note (at the page bottom) like: {14, DEWEY AND TUFTS, *Ethics*, pp 345-7, § 4 } would this: s/{(\d+)}(.+)/ capture the "14" plus the rest on the bracketed line? The HTML would be (methinks): 14, DEWEY AND TUFTS, *Ethics*, pp 345-7, § 4 with the $1 capturing the 14 and $2 capturing the rest? The entire s//g expr would be:: s/{(\d+)}(.+)/