Questions tagged [regular-expression]
Code challenges that involve the use of regular expressions.
99 questions
11 votes
17 answers
916 views
Identify Redundant Regex
A redundant regular expression (regex) is defined here as a regex which has some amount of characters which can be removed while not affecting its functionality -- i.e. it matches the exact same set ...
14 votes
10 answers
1k views
Enumerate all matches of a regex
related For this challenge, we'll be using a simplified dialect of regular expressions, where: A lowercase letter from a to z ...
8 votes
5 answers
2k views
What is the shortest regex for the month of January in a handful of the world's languages?
What is the shortest regular expression equivilant to the following? ...
15 votes
3 answers
439 views
Is it a bigger regex?
You are given two regexes and your task is to determine if the strings matched by the first regex are a subset of the strings matched by the second regex. For this we are going to use a limited ...
14 votes
9 answers
2k views
Convert Regex to Mask
From my CMC. Given a regex and a non-empty printable ASCII text, return one bit per character in the text, indicating the positions of beginnings of non-overlapping matches, and also the positions of ...
5 votes
2 answers
1k views
Generate the shortest regex to match these but not those [closed]
Challenge Given two lists of strings where each string is of length 50 and each list is also of length 50 generate the shortest regex you can that fully matches all the strings in the first list and ...
9 votes
1 answer
241 views
Are We Fast And Furious? [closed]
There are currently nine feature length films in the core Fast & Furious/The Fast and the Furious media franchise, a series of films about bald men scowling and driving cars very fast. The names ...
11 votes
2 answers
2k views
Distinguish English and Spanish with regular expressions
The task is to to compete for the shortest regex (in bytes) in your preferred programming language which can distinguish between English and Spanish with minimum 60%...