Everything at the last space to the extension

A swapping-ground for Regular Expression syntax

Everything at the last space to the extension

Postby jwalton4th » Wed Mar 06, 2019 11:09 pm

I have a bunch of retropie roms I'm trying to rename so I can scrape them. They contain various expressions in them after the name of the rom. For example:

3 Ninjas Kick Back (U) [!].bin ---> 3 Ninjas Kick Back.bin
16 Tiles Mahjong (Unl) [c].bin ---> 16 Tiles Mahjong.bin
Air Busters (U) [h1].bin ----> Air Busters.bin

Can anybody help me with some regex to make this happen? I greatly appreciate it!
jwalton4th
 
Posts: 1
Joined: Wed Mar 06, 2019 11:04 pm

Re: Everything at the last space to the extension

Postby therube » Thu Mar 07, 2019 5:12 am

What constitutes this "expression"?

Anyhow...

This will find the last-most sequence of space+paren " (".
Might work for you?


1:RegEx
Code: Select all
Match:  (.*) \(
Replace:  \1
therube
 
Posts: 1314
Joined: Mon Jan 18, 2016 6:23 pm


Return to Regular Expressions