Sublime Forum

Regex: Search and replace all words that have before and after the signs

#1

Hello, I wanna delete all those words link by the signs .=-" and I need a regex for the solution.

my-dady=true blah blah 1

.my-desire blah blah blah 2

before myself ".custom-captions" blah blah 3

my love .bebe".custom-captions"-oana blah blah 3

The expected result"

blah blah 1

blah blah blah 2

before myself blah blah 3

my love blah blah 3

0 Likes

#2

\S*[.=-]\S*\s*

Breaking it down:

0 or more occurrences of non-whitespace characters: \S*
followed by a . or = or - character: [.=-]
followed by 0 or more occurences of a non-whitespace character: \S*
followed by 0 or more whitespace characters: \s*

1 Like

#3

thanks a lot !!!

0 Likes