• + 7 comments

    Regex can also be done using a non-capturing group:

    (?<!^)(#(?:[\da-f]{3}){1,2})