Re: [PHP] REgular expression....difficult is it?
The ? meta-character is used for matching zero or one occurence of the preceding character , in this case , l . T'his means that you'll match all words that begin with 'Wi' and continue with one or zero 'l' . HTH Sorin Ifrim - Original Message - From: Dhaval Desai [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, February 19, 2001 7:23 AM Subject: [PHP] REgular expressiondifficult is it? Hi! I am not able to understand this REgular expression. /Wil?/ would match "Winnie", "Wimpy" "Wilson" and "William", though not "Wendy" or "Wolf". Howz taht..? Can anybody explain me please. Thank You! Dhaval Desai __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] REgular expression....difficult is it?
At 21:23 18/02/2001 -0800, Dhaval Desai wrote: I am not able to understand this REgular expression. /Wil?/ English Translation: Find a string that contains "Wi" that may or may not be followed by "l". In pure "does the string match?" terms, your example is equivalent to /Wi/ would match "Winnie", "Wimpy" "Wilson" and "William", though not "Wendy" or "Wolf". Howz taht..? Does that help? - Brian White Step Two Designs Pty Ltd - SGML, XML HTML Consultancy Phone: +612-93197901 Web: http://www.steptwo.com.au/ Email: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] REgular expression....difficult is it?
[rearranged back to bottom-posting order, for clarity] In article 012901c09a35$7b64c640$[EMAIL PROTECTED], [EMAIL PROTECTED] ("Ifrim Sorin") wrote: I am not able to understand this REgular expression. /Wil?/ The ? meta-character is used for matching zero or one occurence of the preceding character , in this case , l . T'his means that you'll match all words that begin with 'Wi' and continue with one or zero 'l' . More than that, it'll match any string in which a capital 'W' is followed by a lowercase 'i'. For example: "Don't you love Wile E. Coyote?" "I'm Wigging Out." "The password is 'KiWi'." "The password is '123Wiked'." -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]