SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict CeleronXL's Avatar
    Join Date
    Dec 2002
    Location
    United States of America
    Posts
    349
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    preg_replace tutorial?

    Is there like a really detailed tutorial on preg_replace somewhere? I've been looking around and it's all very confusing..

    Seeing
    preg_replace("/(w+) (\d+), (\d+)/i", "\${1}1,$3", "April 15, 2003");

    Is all ancient egyptian to me..

  2. #2
    SitePoint Zealot oivaf's Avatar
    Join Date
    Apr 2003
    Location
    Mexico
    Posts
    138
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    maybe what you need is some regular expressions tutorials

    in the PHP manual:
    http://www.php.net/manual/en/ref.pcre.php (look for pattern modifiers)

    some tutorials with examples:
    Brief Guide to Regular Expressions - http://www.textartisan.com/articles/regex.html

    Steve Ramsay's Guide to Regular Expressions - http://etext.lib.virginia.edu/helpsheets/regex.html

    Regular expressions in Perl (also applicable to php) - http://www.cs.tut.fi/~jkorpela/perl/regexp.html

    and (uff) there is also a book on the subject:
    Mastering Regular Expressions - http://www.oreilly.com/catalog/regex/ (actually you can download it from somewhere ..... )

    bye


Bookmarks

Posting Permissions

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