Implemented pattern-substitution. #262