Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: reg expres

  1. #1
    Regular Coder
    Join Date
    Sep 2008
    Posts
    280
    Thanks
    25
    Thanked 9 Times in 9 Posts

    reg expres

    Hi all was wondering if there was a way to use preg_replace to find lets say, any anchor tag and then add a space on the end?

    PHP Code:
    $start "><a";
    $end ">";
    $start2 "> <a";
    $end2 "> ";
    $data preg_replace("/(?<=$start).*(?=$end)/m""/(?<=$start2).*(?=$end2)/m"$data,); 
    Any ideas?

  • #2
    Regular Coder
    Join Date
    Sep 2008
    Posts
    280
    Thanks
    25
    Thanked 9 Times in 9 Posts
    (that just replaces the tags with gobbldy goope, obviously)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •