3 added 4 characters in body
source | link

One simple, very old-school way is to do multiple replacement passes:

  1. Replace VectorBase by, say AAAA (some string thatwith chars you're sure doesn'tdon't already occur somewhere).

  2. Replace Vector by VectorBase.

  3. Replace AAAA by VectorBase.

This works for replace-all and query-replace. It's pretty fail-safe and doesn't require any complex matching or fancy replacement regexp.

However: It's important that you first check that there are not already some occurrences of any chars of the string you're thinking of using as the temporary replacement (e.g. AAAA). If there are already such occurrences then choose a different string. ;-) (I typically use a string such as ^G (a Control-G character), input in the minibuffer using C-q C-g - after making sure there is no C-g char in the buffer.)

One simple, very old-school way is to do multiple replacement passes:

  1. Replace VectorBase by, say AAAA (some string that you're sure doesn't already occur somewhere).

  2. Replace Vector by VectorBase.

  3. Replace AAAA by VectorBase.

This works for replace-all and query-replace. It's pretty fail-safe and doesn't require any complex matching or fancy replacement regexp.

However: It's important that you first check that there are not already some occurrences of any chars of the string you're thinking of using as the temporary replacement (e.g. AAAA). If there are already such occurrences then choose a different string. ;-) (I typically use a string such as ^G (a Control-G character), input in the minibuffer using C-q C-g - after making sure there is no C-g char in the buffer.)

One simple, very old-school way is to do multiple replacement passes:

  1. Replace VectorBase by, say AAAA (some string with chars you're sure don't already occur somewhere).

  2. Replace Vector by VectorBase.

  3. Replace AAAA by VectorBase.

This works for replace-all and query-replace. It's pretty fail-safe and doesn't require any complex matching or fancy replacement regexp.

However: It's important that you first check that there are not already some occurrences of any chars of the string you're thinking of using as the temporary replacement (e.g. AAAA). If there are already such occurrences then choose a different string. ;-) (I typically use a string such as ^G (a Control-G character), input in the minibuffer using C-q C-g - after making sure there is no C-g char in the buffer.)

2 added 203 characters in body
source | link

One simple, very old-school way is to do multiple replacement passes:

  1. Replace VectorBase by, say AAAA (some string that you're sure doesn't already occur somewhere).

  2. Replace Vector by VectorBase.

  3. Replace AAAA by VectorBase.

This works for replace-all and query-replace. It's pretty fail-safe and doesn't require any complex matching or fancy replacement regexp.

However: It's important that you first look for anycheck that there are not already some occurrences of any chars of the string you're thinking of using as the temporary replacement (e.g. AAAA). If there are already such occurrences then choose a different string. ;-) (I typically use a string such as ^G (a Control-G character), input in the minibuffer using C-q C-g - after making sure there is no C-g char in the buffer.)

One simple, very old-school way is to do multiple replacement passes:

  1. Replace VectorBase by, say AAAA (some string that you're sure doesn't already occur somewhere).

  2. Replace Vector by VectorBase.

  3. Replace AAAA by VectorBase.

This works for replace-all and query-replace. It's pretty fail-safe and doesn't require any complex matching or fancy replacement regexp.

However: It's important that you first look for any occurrences of the string you're thinking of using as the temporary replacement (e.g. AAAA). If there are already such occurrences then choose a different string. ;-)

One simple, very old-school way is to do multiple replacement passes:

  1. Replace VectorBase by, say AAAA (some string that you're sure doesn't already occur somewhere).

  2. Replace Vector by VectorBase.

  3. Replace AAAA by VectorBase.

This works for replace-all and query-replace. It's pretty fail-safe and doesn't require any complex matching or fancy replacement regexp.

However: It's important that you first check that there are not already some occurrences of any chars of the string you're thinking of using as the temporary replacement (e.g. AAAA). If there are already such occurrences then choose a different string. ;-) (I typically use a string such as ^G (a Control-G character), input in the minibuffer using C-q C-g - after making sure there is no C-g char in the buffer.)

1
source | link

One simple, very old-school way is to do multiple replacement passes:

  1. Replace VectorBase by, say AAAA (some string that you're sure doesn't already occur somewhere).

  2. Replace Vector by VectorBase.

  3. Replace AAAA by VectorBase.

This works for replace-all and query-replace. It's pretty fail-safe and doesn't require any complex matching or fancy replacement regexp.

However: It's important that you first look for any occurrences of the string you're thinking of using as the temporary replacement (e.g. AAAA). If there are already such occurrences then choose a different string. ;-)