![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Join Date: Nov 2004
Location: scv
Posts: 2,299
|
Anybody know regex?
What's a regular expression that will find all occurences of anything between the following characters: {$ and }
So if I have some text: "The site name is {$site}", I need to match 'site'. It has to be greedy as there may be multiple matches. Any ideas? Thanks. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Join Date: Jun 2004
Posts: 689
|
try using this:
/\{\$[^\}]+\}/ BTW: "greedy regexp" does not have anything to do with multiple matches... if you would use /\{\$.*\}/ on "hello {$site} and a happy new {$what}" greedy regexp would match a "{$site} and a happy new {$what}" and the non-greedy one would match a "{$site}" and "{$what}"
__________________
Webmasters! Looking for new affiliate programs to promote? Affiliate Program Search <-- Search for programs with FHGs, RSS feed, specific niche sponsors, ... |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 | |
Confirmed User
Join Date: Nov 2004
Location: scv
Posts: 2,299
|
Quote:
![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Confirmed User
Join Date: Jun 2004
Posts: 689
|
no problem, anytime
![]()
__________________
Webmasters! Looking for new affiliate programs to promote? Affiliate Program Search <-- Search for programs with FHGs, RSS feed, specific niche sponsors, ... |
![]() |
![]() ![]() ![]() ![]() ![]() |