I need to match my line if it starts with any number of spaces or ends with any number of spaces:
my current regular expression also includes spaces between them:
(^|\s+)|(\s+|$)
How can I fix this to achieve my goal?
update:
this does not work because it matches spaces. I want to select a whole line or a line if it starts or ends with spaces.
cplus source
share