Take this Lorem Ipsum text:
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla felis diam, mattis id elementum eget, ullamcorper et purus.
How can I with PHP and regex get everything that comes after Nulla?
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.
Hmm you don’t want to use some simple things like :
if you do not want to look for Nulla, but also for ‘null’ you might consider using stripos instead of strpos…
This code will include Nulla in the returned value. If you want to exclude Nulla, you might want to add it’s lentgh to the strpos value i.e
At last, if you need to have something a bit more generic, and as suggested @Francis :
Honestly regexp are overkill for something like this…