Find and replace n characters long random string in Notepad++ using wildcards/regex
Please make sure you have a backup in case something goes wrong.
- In Notepad++ go to Search → Replace
- In the Find What textbox paste the following:
youtubehd:\w\w\w\w\w\w\w\w
- In the Replace With textbox paste the following:
youtubehd
- Ensure that Search Mode is set to Regular expression
- Click Replace All
Thanks to KCotreau for pointing out that search mode defaults to Normal and needs to be changed.
Edit:
It's been pointed out in the comments below that you could instead use youtubehd:\w{8}
as your search pattern. This is correct and indeed preferable. Support for this was only added in Notepad++ v6 though which came out after this was originally written hence the reason why I used the longer form. See here for more.