News for hackers. Stuff that matters.
Re:\d less efficient than [0-9] by rhizome on Monday May 20, 2013 @12:54AM (#5735968)
Use the s/, Luke

    s/^\s+?(.*)\s+?$/$1/g
Re:\d less efficient than [0-9] by conroe64 on Monday May 20, 2013 @01:19AM (#5736041)
That wouldn't work. First, it will only grab at only one whitespace character at the beginning and at the end. Second, if there was whitespace at the beginning or the end but not both, it won't match at all. "^\s* (.* ?)\s* $/$1/g" would work.
Re:\d less efficient than [0-9] by rhizome on Monday May 20, 2013 @02:22PM (#5739093)
point being: get rid of the anchors in the alternation.