#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2011
    Posts
    56
    Rep Power
    4

    Condense REGEX Substitute


    How can I condense this to one regex.

    Code:
    s/\// /gxms;
    s/:/ /gxms;
    s/[.]/ /gxms;
    Trying to swap out all /, : and . for whitespace.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Apr 2009
    Posts
    1,930
    Rep Power
    1225
    Code:
    s~[/:.]~ ~gxms;
    or
    Code:
    tr~[/:.]~ ~;
    Last edited by FishMonger; May 10th, 2013 at 08:31 AM.

IMN logo majestic logo threadwatch logo seochat tools logo