Created
March 24, 2023 10:46
-
-
Save dev-jaydeep/3ce99fe6311d457fd128e793bc01f451 to your computer and use it in GitHub Desktop.
Find all words in double curly braces from given string using php
This file contains 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 | |
$string = 'This is a {{ sample }} string with {{ curly }} brace'; | |
preg_match_all('/\{{([^}]*)\}}/', $string, $matches); | |
print_r($matches[0]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment