Hi jesop7911, welcome.
jesop7911 wrote:Hi , I am a complete novice at this type of thing and also I am not technical and just dont understand so I need help.
I have a database of 14000 names and all but a few have a suffix of - and then a number.
I have downloaded BRU but have no idea what to do next to remove the - and the number.
Can someone help pls , otherwise I see myself spending hours trying but getting nowhere fast.
Like "file name - 12345.ext" ?
Try this RegEx rule:
Match: (.+) - \d+
(.+) ===> find one-or-more of any sign and group them in group 1
' - \d+' => find blank dash blank followed by one-or-more digit
Replace by what is found in group 1 by the meta char '\1'
-------------------General notes/ Disclaimer
Hope this helps ?
If yes, please help two others too. And consider an donation to the tools autor.
* Usaly i do a few tests on this issue only!
* So please test my solution with some test files first before you destroy your data.
* Select one or more files in the Name column to watch how the New Name will be.
RegEx is an pattern matching solution, so all your files have to fit into the same pattern.
If they not, you have to separate them and run some more actions against them.
To find your own solution you have to virtual (in mind) split your file names/strings into parts
following the rules of the regular expression syntax, see the help file coming with your application.
(Please note that there are several flavors of RE engines and also different implementations into apps
and even different ways of doing or thinking, so your expiriences may differ from my explanation)
Once you have split your string into parts you can decide which to use into replacement by grouping the pattern
into (...) parenthesis to which you can refer by using "\1" or "$1" signs later, or which to drop and which to modify.
* It's always an good idea to provide all possibilities of file name pattern in question.
* That would give the supporter an change to do it right
* If your real file names doesn't fit into your example pattern my solution may fail.
* Don't use this ' ' or " " -quotes from my explanation. They are only for clarification.
* '?' means non-greedy: stop at first match, instead of last possible.
* This (...) parenthesis are used to "group" what is found by this RegEx inside the ()'s
to reuse this capture later as replacement by using \1 or $1.
* Instead of ~ -signs, if used in my explanations, type an space/blank.
* online tester:
* online help:
See this both oldest threads in the "Regular Expressions" forum for an RegEx syntax overview:
=> Getting Started: http://www.bulkrenameutility.co.uk/forum/viewtopic.php?f=3&t=5
=> Go ahead: http://www.bulkrenameutility.co.uk/forum/viewtopic.php?f=3&t=27
There you will find more examples and tips as you may find in other threads in the "Regular Expressions" sub-forum.