小楊 wrote: > Does anyone know the following syntax's meaning or usage? > > Can anyone help me to understand this syntax? Or if available, can anyone > provide me some useful example to understand more? > > Thank you all that help me. > > The syntax is as follow: > > */**a (?:black|grey|white) cat/*
( ) are capturing parentheses, they capture the enclosing text inside the parentheses and store it in one of the numerical variables like $1, $2, $3, etc. (?: ) are NON-capturing parentheses, they don't effect the numerical variables. | is the aternation meta-character, it delimits different alternative patterns that you want to match. Match 'black' OR match 'grey' OR match 'white'. perldoc perlre John -- Perl isn't a toolbox, but a small machine shop where you can special-order certain sorts of tools at low cost and in short order. -- Larry Wall -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/