Created
July 20, 2021 16:07
-
-
Save MikelArnaiz/ee02df2b2d3957821306413d6115da5d to your computer and use it in GitHub Desktop.
Regex to replace text in VS code in between two words multiline
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Search: | |
export const dispatchToProps = \{((.|\n)+)\}; | |
Replace: | |
export const dispatchToProps = () => ({$1}); | |
Or: | |
export const dispatchToProps = \{(.*?)\}; | |
So it would be also: | |
<h3>(.*?)<\/h3> | |
### $1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
finding connect that with dispatch functions that aren't called
dispatchToProps
ormapDispatchToProps
connect((.+), (?!(dispatchToProps|mapDispatchToProps))(.+))