4.6.5.7 - - [date]
If I do \A4 for the above string I can get 4,
but if I do \Adate, I could not get a match. I probably misread the regex docs. Anybody can help?
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.
If you need to be very specific and look for that particular string in square brackets, just use ‘\[date\]’.
If your query was more general, as the other posters have mentioned \A means ‘start of string’ rather than ‘start of word’.
(This is a good site to test out different regex commands with instant feedback: http://rubular.com/)