•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 373,364 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,632 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 246 | Replies: 1
![]() |
i have looked at many regex charts and tutorials but i still cant get preg_match_all do what i need it to do.
i need to return this example:
the hard part is that there can be many layers of ${}
this is what i came up with. i have very little regex knowledge so it is majorly messed up:
i need to return this example:
param1,$config{}from this string
note: none of the data in the string has anything to do with php
$new_config{param1,$config{}}
the hard part is that there can be many layers of ${}
this is what i came up with. i have very little regex knowledge so it is majorly messed up:
php Syntax (Toggle Plain Text)
$regex = "@(^\$[a-zA-Z_]\{(.\s)*\}$)(?=(\$[a-zA-Z_]\{(.\s)*))@siu";
toast
edit> what i meant was that i need to get all strings that match this:
$ALL_LETTERS_AND_UNDERSCORE{}
as long as it is not already inside of a match of the same expression.
so.
i want to return all of the containers that match the expression.
i coulnt edit because in the hour between the origional post and the edit, someone viewed it.
$ALL_LETTERS_AND_UNDERSCORE{}
as long as it is not already inside of a match of the same expression.
so.
i want to return all of the containers that match the expression.
i coulnt edit because in the hour between the origional post and the edit, someone viewed it.
toast
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb PHP Marketplace
Other Threads in the PHP Forum
- Previous Thread: Open Webcam Application
- Next Thread: Session management


Linear Mode