Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2003
    Posts
    69

    reg expression suppose to be greedy

    Hi, I have some reg expressions setup on my site to parse bbcodes.

    ex. preg_replace on a
    Code:
    /\[b\](.*)\[\/b\]/
    This acutally works when I have multiple (b) tags....shouldn't it be greedy and not work correctly if i have several (b) tags.

  2. #2
    Join Date
    Jan 2003
    Posts
    69
    stupid me, i forgot that regexp do one line at a time...lol

Posting Permissions

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