Skip to content
Better HN
Top
Best
Ask
Show
New
Jobs
Search
⌘K
0 points
conroe64
13y ago
0 comments
Save
Share
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.
0 comments
1 comments · 1 top-level
top
newest
oldest
rhizome
13y ago
point being: get rid of the anchors in the alternation.
j
/
k
navigate · click thread line to collapse