I have the following aaaa_bb_cc string to match and written a regex pattern like
\\w{4}+\\_\\w{2}\\_\\w{2} and it works. Is there any simple regex which can do this same ?
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.
I sometimes do what I call “meta-regexing” as follows:
Note that this doesn’t use
\w, which can match an underscore. That is, your original pattern would match"__________".If
xreally needs to be replaced with[a-zA-Z0-9], then just do it in the one place (instead of 3 places).Other examples