regular expression: Remove all characters except a word

If you need help on how to use the program
Post Reply
otreux
Posts: 194
Joined: 2008-10-22 16:55:46

regular expression: Remove all characters except a word

Post by otreux »

Hi:)
I have this problem, I have many fine that have long name, I want delete all except a word. For example:

actual name:
new:bin, archive2012Mary

new name that I want:
Mary

Is possible?
antp
Site Admin
Posts: 9665
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

Hi,
What is the criterion for defining the word to keep?
otreux
Posts: 194
Joined: 2008-10-22 16:55:46

Post by otreux »

there isn't a criterion :(
Usually is the last word (and sometime it have another word attached), but in some documents in the middle
antp
Site Admin
Posts: 9665
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

Well if there isn't a rule, how could it be "programmed"? :??:
otreux
Posts: 194
Joined: 2008-10-22 16:55:46

Post by otreux »

im not expert abut the regualr expression. I have request if is possible remove all the caracters without a word :)
antp
Site Admin
Posts: 9665
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

Depends what is the rule for the "a word".
The last one? Yes.
"Not always the last one"... more difficult :D
Post Reply