extractreplace function

Extract and Replace parts of hyperSpec objects