| Author |
Search and replace tip
|
Nicolas Viollin
Greenhorn
Joined: Apr 13, 2001
Posts: 6
|
|
Hi there !
I've got many string like this 'xxxxyyyzzz'. 'xxxx' and 'zzz' are fixed part of the string, they're always the same.
I would like to replace that 'xxxxyyyzzz' string with this 'xxxxyyyzzzwwww' string.
How do i tell the S&R to keep the mobile part of my string and simply add the 'wwww' part ?
to be clear, here are exemples:
'Mike125NAT' where 'Mike' is 'xxxx', '125' is 'yyy' and 'NAT' is 'zzz' would become 'Mike125NATFive'
'James007Bond' where 'James' is 'xxxx', '007' is 'yyy' and 'Bond' is 'zzz' would become 'James007BondLicencedtokill'
thanks for your help !
|
 |
Stefan Wagner
Ranch Hand
Joined: Jun 02, 2003
Posts: 1923
|
|
Is the variable-part allways 3 characters long, then use ... instead of .*, is it allways made of digits, use [0-9]*, is it something, except a blank, use [^ ]* .
May there be multiple replacements in a row, use 'g' for global as postfix-operator:
|
http://home.arcor.de/hirnstrom/bewerbung
|
 |
Nicolas Viollin
Greenhorn
Joined: Apr 13, 2001
Posts: 6
|
|
|
thanks a lot, works perfectly !
|
 |
 |
|
|
subject: Search and replace tip
|
|
|