-
PCRE and round brackets
was gonna ask how to replace content between round brackets, but I figured it out as I was typing
. Here it is if'n you are curious:
$string = "there is (34)(pops) nothing here.";
$string = preg_replace('/\(.*?\) ?/', 'la', $string);
$string = "there is lala nothing here.";
I used a variation of this script that twey showed me in an earlier post:
$string = preg_replace('/have.*?not ?/', '', $string); to produce:
$string = preg_replace('/\(.*?\) ?/', 'la', $string);
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks