Modified the regex in processString method.
Added method to remove duplicates from list with additional buffer.