- print_r: documentation ( source)
- preg_match_all: documentation ( source)
<?php
$sentence = "Locally meet daily newlywed for next 3 days";
// Use preg_match() function to check match
preg_match_all('/\b(?!(?:daily|weekly|monthly))(\w+ly)\b/', $sentence, $matches, PREG_OFFSET_CAPTURE);
// Display matches result
print_r($matches);