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
  1. #1
    New Coder
    Join Date
    Jun 2008
    Posts
    50
    Thanks
    18
    Thanked 0 Times in 0 Posts

    preg_replace $pattern help

    I've been looking at the preg_replace() function, but I just can't seem to figure out the $pattern part to look for the things to replace.

    There are back slashes and square brackets involved in this part amongst other things, and I can't find any articles or tutorials on how it works.

    Does anyone have any links on how to construct this part, or would like to give me a quick crash course on how to construct it?

  • #2
    Master Coder
    Join Date
    Dec 2007
    Posts
    6,682
    Thanks
    436
    Thanked 890 Times in 879 Posts
    Quote Originally Posted by Inersha View Post
    I've been looking at the preg_replace() function, but I just can't seem to figure out the $pattern part to look for the things to replace.

    There are back slashes and square brackets involved in this part amongst other things, and I can't find any articles or tutorials on how it works.

    Does anyone have any links on how to construct this part, or would like to give me a quick crash course on how to construct it?
    I don't know how it is, I just search for regex +tutorial with google:

    http://www.regular-expressions.info/quickstart.html

    once you have a basic understanding the manual is pretty clear, some experiments and post specific question in this forum.

    regards
    Last edited by oesxyl; 08-01-2008 at 11:14 PM.

  • Users who have thanked oesxyl for this post:

    Inersha (08-02-2008)


  •  

    Posting Permissions

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