yassinebridi / serpl

A simple terminal UI for search and replace, ala VS Code.
MIT License
568 stars 4 forks source link

[Feature] Capture groups #37

Open eltribehou opened 3 months ago

eltribehou commented 3 months ago

Hi,

First thanks for this, it's great. Would it be possible to implement capture groups ?

IE contrived example: text: my_function2() search: (.*)fun.*(\d+) replace: "$2$1$2" gives: "2my_2"

Note how I gave you nice edge cases while i was at it 🤣

Anyway just a nice feature to have imo.

Thanks.

yassinebridi commented 3 months ago

Hey, thanks for raising this up. This is a pretty useful feature, i will add it to the list.

StefanTerdell commented 4 weeks ago

@yassinebridi Thank you for this great util! This is pretty much the only feature I'm missing. I'd be happy to take a crack at it if you're open to that?

yassinebridi commented 4 weeks ago

Hey @StefanTerdell, thanks 🙏 Yes please, would love that.