I need to match files like the following
session1_******.php
Do I do something like this?
{session1_}^(.*).php
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.
The most direct answer
A carat (^) is used to indicate the beginning of a string or to negate a character class (e.g. [^abc] … meaning not “a”, “b”, or “c”), it has no meaning in the middle of a regex.
Parenthesis are only needed if you need to capture the result.
A period (.) must be escaped.
Assuming this this is the entire string you are matching, the ^…$ require a full match from beginning to end. If there could be text before the beginning remove the ^, or there could be text as the end remove the $.