Menu{Master,Maestro,etc} question(s)

Bill Campbell bill at celestial.com
Tue May 8 20:04:11 PDT 2007


On Tue, May 08, 2007, Jay R. Ashworth wrote:
>On Tue, May 08, 2007 at 04:48:08PM -0400, Fairlight wrote:
...
>> > # the regex ahead is:
>> > #
>> > # label:if:var="contents"  :
>> > # ''''','','''','''''''','',
...
>I'm trying to replace the contents of the single pair of double quotes
>in between second and third colons.  See the example, with the commas
>and apostrophes for delineation, and the backreferences below, above?

In perl one might write this:

	s/^label:if:var=".*"/label:if:var="$myvalue"/;

Personally I would probably split on ':', deal with the individual pieces,
then join them back together as a more general solution.

I would also be more likely to do this in python now as I've been writing a
lot more python than perl for several years now (and will be doing a
presentation at next month's Seattle Perl User Group comparing python and
perl which should be fun :-).

Bill
--
INTERNET:   bill at Celestial.COM  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:            (206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

``The children who know how to think for themselves spoil the harmony of
the collective society that is coming, where everyone would be
interdependent.''  1899 John Dewey, educational philosopher, proponent of
modern public schools.


More information about the Filepro-list mailing list