Added check, if regex actually contains the end tag, and only then try to strip it, else it keeps only first 6 chars, which is bad.
Added check, if regex actually contains the end tag, and only then try to strip it, else it keeps only first 6 chars, which is bad.

vedmack/yadcf,vedmack/yadcf