- Regular Express - match all char but pattern at the end of line
- Hello, World! [strip this]
- Hello, World!
- Hello, [cold] World! [strip this]
- Hello, [cold] World!
- fge@erwin ~ $ perl -ne 's,s*[[^]]+]s*$,,; print "Result: -->$_<--n"'
- Hello, World! [strip this]
- Result: -->Hello, World!<--
- Hello, [cold] World! [strip this]
- Result: -->Hello, [cold] World!<--
- fge@erwin ~ $
- (.*)(s*[.*])