Replacing any content inbetween second and third underscore
问题 I have a PowerShell Scriptline that replaces(deletes) characters between the second and third underscore with an "_": get-childitem *.pdf | rename-item -newname { $_.name -replace '_\p{L}+, \p{L}+_', "_"} Examples: 12345_00001_LastName, FirstName_09_2018_Text_MoreText.pdf 12345_00002_LastName, FirstName-SecondName_09_2018_Text_MoreText.pdf 12345_00003_LastName, FirstName SecondName_09_2018_Text_MoreText.pdf This _\p{L}+, \p{L}+_ regex only works for the first example. To replace everything