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 4 of 4
  1. #1
    Regular Coder
    Join Date
    Nov 2002
    Location
    Carmel California
    Posts
    471
    Thanks
    0
    Thanked 1 Time in 1 Post

    Question regular expresions?

    HI, I am wondering how u do regular expresions (like in js) in php, anybody got any guides...

    specifically I have two questions for regular expresions:

    how wold i make some thing that auto parses urls, like this forum does, so searches for a url in a string then makes it a link in html?

    and how would I make the image feature like this forum. with the vBcode tag thing, that gets converted it to html


    I want to add these 2 features to my guestbook message board thingie, and I don't know regular expresions, so i don't know how id do it. I do know how to do the simple replace function, but thats it.
    Last edited by kwhubby; 01-08-2004 at 06:47 AM.
    Kris Hubby
    kwhubby site

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    frankfurt, german banana republic
    Posts
    1,848
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Searching the PHP forum for "bbcode" shows quite useful results:
    http://www.codingforums.com/search.p...der=descending
    De gustibus non est disputandum.

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Location
    Sheffield, UK
    Posts
    552
    Thanks
    0
    Thanked 0 Times in 0 Posts
    i found the page entitled "Pattern Syntax" (http://uk.php.net/manual/en/pcre.pattern.syntax.php) in the PHP manual taught me everything i needed to know, basically you use the functions on this page: http://uk2.php.net/manual/en/ref.pcre.php
    "To be successful in IT you don't need to know everything - just where to find it in under 30 seconds"

    (Me Me Me Me Me Me Me Me Me)

  • #4
    Regular Coder
    Join Date
    Nov 2002
    Location
    Carmel California
    Posts
    471
    Thanks
    0
    Thanked 1 Time in 1 Post
    ah ha! thank you, exactly what I needed. I didn't think of searching for that, I did search for some other terms and didnt find any thing very useful.
    Kris Hubby
    kwhubby site


  •  

    Posting Permissions

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