I saw a regular expression says (?i). So what does it mean when we put a question mark in front of a character?
I saw a regular expression says (?i) . So what does it mean when
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In general it does not mean anything and might even result in an error (if the question mark does not follow a valid character). But there are certain characters where it does have an effect, namely if this character is also used as modifier.
regular-expressions.info says about this particular syntax:
?imeans that everything following these characters should be matched case-insensitive.Also note that, as the text says, not all regex flavors support this syntax.