As already said, the replace command is your friend.
replace pattern "old" with "new"
It operates from the current level of the configuration hierarchy and below. In other words, if you are inside vlans it will only operate inside vlans. If you are at the top level it will affect the entire configuration.
One thing you can do before doing a global replace like this is to look for the old pattern in the config first to see what appears. Sometimes the original pattern appears in unexpected places. From the top of the configuration:
show | display set | match "old"
If you are using any annotations, replace pattern will affect them as well. Unfortunately, annotations don't appear in display set format. To check for annotations with that pattern:
show | match "^ */?\*" | match "old"
The first match will pull out any of the annotations. The second match looks for the pattern you will be replacing. If nothing comes back, great! If something does come back, then you'll need to figure out where it is in the config. Take a couple words from the annotation text, then do:
show | find "annotation text"
And last, absolutely, positively, compare before you commit. And don't make other changes at the same time to be safe.
top
show | compare
If you see something in the comparison that shouldn't be there, you can use the rollback command to undo all of the changes or just correct the things that shouldn't have changed. If you understand the patch format displayed by show | compare, you can use that as well. Copy out the entire comparison output to your favorite text editor. Inside the text editor, delete the parts that shouldn't have been changed. Go back to the device and use the rollback command. Then use "load patch terminal" and paste in the updated contents of the text editor. Press enter then control-D to finish. Use show | compare again to make sure that this time the changes are only the ones you want.
Oh, and be careful doing this on older code (10.0 and earlier). The switches would sometimes get rather confused and/or upset when the vlan names changed. Use commit full on those. It won't hurt to use it on newer code as well.
Cheers!
-Chad