On 2005-07-25 17:50:37 +0800 (Mon, Jul), Zhang Weiwu wrote: > My RE must be wrong but I can hardly successfully match a whole line > like the below example: > > This works: > [EMAIL PROTECTED]:/tmp$ egrep "\b*\/[*].*[*]\/\b*" Calendar.php > /* $Id: class.boalarm.inc.php,v 1.1.1.1 2005/03/18 09:17:36 > dawnlinux Exp $ */ > /* $Id: class.boalarm.inc.php,v 1.11 2004/05/23 14:51:27 > ralfbecker Exp $ */ > > This doesn't work: > [EMAIL PROTECTED]:/tmp$ egrep "^\b*\/[*].*[*]\/\b*$" Calendar.php > > any hint?
man grep: The symbol \b matches the empty string at the edge of a word It seems that '/' is not considered to be a part of a word. I suppose you may use "^[[:space:]]*/[*].*[*]/[[:space:]]*$" Calendar.php -- No virus found in this outgoing message. Checked by 'grep -i virus $MESSAGE' Trust me.
pgpfnqmjJw5aa.pgp
Description: PGP signature