The method regexpReplace in Replace class is long and difficult to
comprehend due to its complex flow of execution caused by the loop,
switch and if statements. The method can be shorter by extracting less
cohessive parts using extract method refactoring. 
for compelete details regarding to this refactoring please refer to the
publishe JEdit Milestone #3, section 2.1.3 Long Method
Merge pull request #4 from SOEN6471-jEdit/longmethodrefactoring

longmethodrefactoring pull request