If I have:
Some text
More text
Even more text
What is the more elegant way to obtain:
Some text
More text
Even more text
All with knowing the number of repeated tokens
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 method to do so using regular expressions would be
(The
(?:...)syntax is a non-capturing group, which can be replaced with a capturing group (just(...)), but that is slightly less efficient and not more readable, IMO.)