Community Patterns

Community Library Entry

0

Regular Expression
Created·2021-12-03 21:24
Flavor·Python

r"
(?P<Hex>(?<=.[^}{])#(?:[\dA-F]{6}|[\dA-F]{3})(?=\W[^}{]))+
"
ig
Open regex in editor

Description

A solution of this test from HackerRank

https://www.hackerrank.com/challenges/hex-color-code/problem

Submitted by anonymous