DEV Community

Piotr Przeklasa
Piotr Przeklasa

Posted on

How to remove dashes only from the line in RegExp?

How to remove dashes only from the line in RegExp?

HKCU\Profiles\0\lines to modify " -a -b -c"

ex.

HKCU\Profiles\0\lines to modify " -a -b -c"
HKCU\Profiles\0\line line unchanged " -a -b -c"

it should be

HKCU\Profiles\0\lines to modify " a b c"
HKCU\Profiles\0\line line unchanged " -a -b -c"

Top comments (0)