1

I am trying to replace all the strings which have:

Podcast 001 lksdf woejs sdklfjs wefsd
Podcast 002 sdfsd fgd
Podcast 003 fsdgw fdfs
Podcast 004 fdger fgdf
.
.

to

Podcast 001 - lksdf woejs sdklfjs wefsd
Podcast 002 - sdfsd fgd
Podcast 003 - fsdgw fdfs
Podcast 004 - fdger fgdf
.
.

So I've searched for:

Podcast [0-9][0-9][0-9] 

and tried to replace it with:

Podcast [0-9][0-9][0-9] - 

So I get:

Podcast [0-9][0-9][0-9] - etc.

which obviously is wrong.

What do I miss here?

0

Use a reference to capture group:

  • search for: (Podcast \d{3})
  • replace with: $1 -

Where $1 is the content of group 1.

| improve this answer | |
  • Thank you Toto! Which terms should I search in google in order to study this practice? – dushkin Jul 10 '18 at 18:50
  • @dushkin: You'll find usefull informations here: regular-expressions.info – Toto Jul 10 '18 at 20:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.