$re = '/(.*\?$)/m';
$str = '
The deadline to submit your online application is December 1st 2021. That means that all documents required for your application should be submitted by the deadline or your application may not be considered.
Applicants will be notified of admissions and fellowships decisions by late February or early March.
https://sociology.berkeley.edu/admissions-information-graduate-program
https://sociology.berkeley.edu/faq-admissions
FAQ for Admissions
How old is too old for the GRE and TOEFL scores?
The TOEFL needs to be taken within 2 years of the time you would be starting your program at UC Berkeley. For Fall 2022 admissions, TOEFL test scores are valid as far back as June 2020. The GRE needs to be taken within the last 5 years of starting the program. For Fall 2022 admissions, GRE test scores are valid as far back as 2016.
What is the institution code for the GRE and TOEFL exams?
The institution code is 4833. Departmental code is no longer required.
My GRE scores will not arrive until one week (or two weeks) after the deadline. Is this a huge problem?
As long as your application is submitted by the deadline we will accept GRE scores that are two weeks late. However, if other things are late as well, there is a chance you will not be considered for admission.
Are international applicants required to take the GRE?
Yes, all applicants, domestic and international, are required to take the GRE exam.
What are minimum GRE scores?
We do not have a minimum GRE scores required to apply. However, the average GRE scores of admitted applicants are listed below.
GRE Verbal (score): Average score of 163. The middle sixty percent of admitted applicants have scores between 159 and 168.
GRE Verbal (percentile): Average percentile of 90. The middle sixty percent of admitted applicants have percentiles between 83 and 98.
';
preg_match_all($re, $str, $matches, PREG_SET_ORDER, 0);
// Print the entire match result
var_dump($matches);
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for PHP, please visit: http://php.net/manual/en/ref.pcre.php