How to find something in a string

Discussion in 'PHP' started by GeorgeBaker, Aug 17, 2012.

  1. Soulstone

    Soulstone Peon

    Messages:
    28
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #21
    I would use regular expressions for this task any day.
     
    Soulstone, Aug 18, 2012 IP
  2. BRUm

    BRUm Well-Known Member

    Messages:
    3,086
    Likes Received:
    61
    Best Answers:
    1
    Trophy Points:
    100
    #22
    I agree. Although I think people need to be careful with regular expression functions. When doing tasks like replacing simple parts of a string, str_replace() is faster and more appropriate. No need to take the hammer to the screw, so-to-speak.
     
    BRUm, Aug 18, 2012 IP