regex operations, and a lost of fucking this special cases