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

    Join Date
    Jun 2011
    Posts
    57
    Rep Power
    5

    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 Regular (2000 - 2499 posts)

    Join Date
    Apr 2009
    Posts
    2,057
    Rep Power
    1229
    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