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 9 of 9
  1. #1
    Regular Coder
    Join Date
    Feb 2005
    Location
    Texas
    Posts
    472
    Thanks
    1
    Thanked 0 Times in 0 Posts

    preg_replace() Help

    Could someone please give me a ridiculously over detailed explaination of the function preg_replace()?
    If you're reading this, it may already be too late!

  • #2
    Regular Coder
    Join Date
    May 2005
    Posts
    563
    Thanks
    0
    Thanked 3 Times in 3 Posts

  • #3
    Regular Coder
    Join Date
    Feb 2005
    Location
    Texas
    Posts
    472
    Thanks
    1
    Thanked 0 Times in 0 Posts
    I went to that. It's not over detailed enough.
    If you're reading this, it may already be too late!

  • #4
    Regular Coder
    Join Date
    Jul 2004
    Posts
    134
    Thanks
    0
    Thanked 0 Times in 0 Posts
    PHP manual @ http://php.net/ is the ultimate solution.

    http://www.mediasworks.com/

  • #5
    Regular Coder
    Join Date
    May 2005
    Posts
    563
    Thanks
    0
    Thanked 3 Times in 3 Posts
    that's what my link was to.

  • #6
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,994
    Thanks
    4
    Thanked 2,662 Times in 2,631 Posts
    regular expressions are interesting, even with an excellent and detailed tutorial, I'd have to say, IMO, regular expressions are one of the most difficult aspects of scripting.
    What is it you are looking to do, perhaps one of us can script it up for you.

  • #7
    Regular Coder
    Join Date
    Feb 2005
    Location
    Texas
    Posts
    472
    Thanks
    1
    Thanked 0 Times in 0 Posts
    No I don't need scripting done for me. I just want to know how it works. I just don't get this stuff about patterns and whatever.
    If you're reading this, it may already be too late!

  • #8
    Regular Coder
    Join Date
    Feb 2005
    Location
    Texas
    Posts
    472
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Ok I was able to figure out enough about it to make a simple BBcode. I guess it was all the slashes and (.*?) and whatever else that was confusing me.
    If you're reading this, it may already be too late!

  • #9
    Senior Coder nikkiH's Avatar
    Join Date
    Jun 2005
    Location
    Near Chicago, IL, USA
    Posts
    1,973
    Thanks
    1
    Thanked 32 Times in 31 Posts
    Regular expressions tend to work really similarly across platforms and languages.
    If the symbols confuse you, perhaps a basic regexp reference would help.
    Try here.
    http://www.regular-expressions.info/reference.html

    If this post contains any code, I may or may not have tested it. It's probably just example code, so no getting knickers in a bunch over a typo, OK? If it doesn't have basic error checking in it, such as object detection or checking if objects are null before using them, put that in there. I'm giving examples, not typing up your whole app for you. You run code at your own risk.
    Bored? Visit
    http://www.kaelisspace.com/


  •  

    Posting Permissions

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