Php Preg_Match Pattern for Week Days Name

Php preg_match Pattern for Week Days Name - The Rich Post


Hello to all, welcome to In this post, I will tell you, Php Preg_Match Pattern for Week Days Name. 

This code helped me lot to solved my major problem in work and I am hoping this will help others.

Here is the working code and tested code for Php Preg_Match Pattern for Week Days Name:

$str = '2018-09-09sundayShift1From=12:30pm';

preg_match('/monday?|tuesday?|wednesday?|thursday?|friday?|saturday?|sunday?/', $str, $matchs);
echo $matchs[0];
//output is sunday

 If you have any query related to this post, then please do ask questions or comment below.

Thank you.

Ajay Malhotra
the authorAjay Malhotra
Hello to all. Welcome to Myself Ajay Malhotra and I am full stack developer. I love coding. I know Wordpress, Core php, Angularjs, Angular 2, Angular 6, Angular 7, laravel, Codeigniter, Shopify, Squarespace, Jquery, Google Map Api, Vuejs, Reactjs, Bigcommerce etc.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Positive SSL