Posts tagged: regex

All posts with the tag "regex"

4 posts latest post 2024-10-08
Publishing rhythm
Oct 2024 | 1 posts

I’ve heard prime say just give it the one eyed fighting kirby so many times, and execute it few times, and there is no way to find it online, so this will be the link that I will come to, when I need to remember what @theprimeagen means when he says Give it the one eyed fighting kirby.

:s/\(.*\);/console.log(\1)

So what is this? #

This is a vim substitute comand to replace text in the buffer. the one eyed fighting kirby is a regex capture group to capture everything between matches, and assign it a value to place back in after the match.

substitute in a nutshell, :s/<what you want to replace>/<what you want to replace with>

Here is a contrived example of text.

...