On 26 Nov 2002 12:58:44 +0100, Olivier Chapuis wrote: > > When I say "translate our sample" it just means to replace certain > strings as > > + I "Programs" Popup MenuProgram > > by > > + I "$[gt.Programs]" Popup MenuProgram > > then we should be able to extract only the String which appear > as $[gt.String] from our rc sample: > > perl -ne 'print "$1\n" if /\[gt\.(.*)\]/' file1 file2 > > (is this ok in all situation?).
The following is ok in all reasonable situations: perl -ne 's/\[gt\.((\\.|.)+?)\]/print "$1\n"/ge' file1 file2 i.e. with something like: + I $[gt.Programs] Exec xmessage $[gt.\[Error\] Can't read file] $[gt.Programs] properly adds quotes, so should not be placed in quotes. Regards, Mikhael. -- Visit the official FVWM web page at <URL:http://www.fvwm.org/>. To unsubscribe from the list, send "unsubscribe fvwm-workers" in the body of a message to [EMAIL PROTECTED] To report problems, send mail to [EMAIL PROTECTED]