LPS-43587 continue with pure string buffer manipulation instead of switching to regex

@brianchandotcom let me know if you disagree and we can switch back to the original impl