On 5/12/07, 小楊 <[EMAIL PROTECTED]> 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/*


Well, I am fairly sure that is not a valid Perl regex, but assuming you mean

/a (?:black|grey|white) cat/

This will match the letter "a", followed by a space, followed by one
of the following "black", "grey", or "white", followed by a space,
followed by "cat".  So the following strings will all match:

"I saw a black cat"
"I would like a grey cat"
"a white cat met a black dog"

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to