Fixed bug in Issue #91. Changed the position of the function rtrim in me...

...thod createRegexPatterns