Created
October 29, 2018 15:49
-
-
Save ammarfaizi2/25a0d7b06c6a35e110f9bfe37e6dee1e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$a = | |
"Hi there! My nickname is atb00ker. Today, 24-11-18 I learnt to use regular expressions! | |
Hi there! My nickname is Ajay. Today, 23-1-19 I learnt to use regular expressions! | |
Hello, i am Ajay | |
This is any other string."; | |
preg_match_all("/My nickname is [a-zA-Z0-9]*\. Today, \d{1,2}\-\d{1,2}\-\d{1,2} I learnt to use regular expressions!/Usi", $a, $m); | |
var_dump($m); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment