• 0

Having trouble with preg_replace_callback



Hello all,


I'm trying to write a

preg_replace_callback(); function that would find



Right now I have tried using



and basically nuke it.


but it doesn't seems to be working. My current code looks like this:


$resume_text = preg_replace_callback('#\[attachment=([0-9]+)\](.*?)\[\/attachment\]#', "callback", $resume_text);

function callback($match)

    return $match;


Could someone please tell me where I am going wrong?



Link to post
Share on other sites

1 answer to this question

Recommended Posts

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.