Hello, @luis-eduardo-martinez-ruiz, and All,
Indeed, Scott gave you the right link to the related discussion to your problem ! But, as this discussion contains many posts and as you could be a bit “lost”, I think that I’m able to build a suitable regex for your needs :-))
You said, in your first post :
I want to replace those names for numeric codes
And you gave an example, with 4 forenames ( I just copied real text ! ) :
<MANUFACTURER_PID>Luis</MANUFACTURER_PID>
....
<MANUFACTURER_PID>Rosa</MANUFACTURER_PID>
...
<MANUFACTURER_PID>Ernesto</MANUFACTURER_PID>
...
<MANUFACTURER_PID>Matias</MANUFACTURER_PID>
which have to be replaced by the 4 numeric codes ( Again, I just copied real text, not the regex ! ) :
<MANUFACTURER_PID>07498358092</MANUFACTURER_PID>
...
<MANUFACTURER_PID>07498311593</MANUFACTURER_PID>
...
<MANUFACTURER_PID>07498319913</MANUFACTURER_PID>
...
<MANUFACTURER_PID>07498351833</MANUFACTURER_PID>
So I suppose that you have a specific file which links up these forenames to the numeric codes, and vice-versa. I mean, a file like that :
Luis : 07498358092
Rosa : 07498311593
Ernesto : 07498319913
Matias : 07498351833
or, may be, like that :
07498358092 = Luis
07498311593 = Rosa
07498319913 = Ernesto
07498351833 = Matias
Just tell me the structure of this specific file ( that I call the links file ), and we’ll be able to get the right regex S/R, which allows the change of any number of names, possibly repeated, with their respective numeric codes ( even 52000 items ! ) in one step, only :-))
Remarks :
ONE condition is mandatory : In this links file, all the names and numeric codes must be UNIQUE !
The order of names, in the initial text, can be completely different than the order they occur, in the links file. No problem !
And, as I said above, some names may be repeated, in the text to be changed. No problem, too !
See you later,
Best Regards,
guy038