All Questions
Tagged with regex programming-challenge
27 questions
6
votes
2
answers
714
views
Weather Observation Station 8 query
Here's my (correct) solution to a HackerRank question:
Weather Observation Station 8
Query the list of CITY names from STATION which have vowels (i.e., a, e, i, o, and u) as both their first and last ...
2
votes
4
answers
307
views
A simplified regular expression matcher
I am working my way through some code challenges — partly to improve my problem solving, but also to improve my code quality.
I think my current (fully-functional) solution to a challenge is pretty ...
1
vote
1
answer
603
views
Coin Flip Streaks script
I am attempting to complete the coin flip streaks problem from automate the boring stuff with python.
My code works fine but my only concern is the phrasing of the task.
Does the question want us to ...
6
votes
1
answer
146
views
Extract strings from nested array in Perl
Extract the strings from nested arrays in Perl.
It prints: a, b, c, d, E
...
13
votes
2
answers
5k
views
Average spam confidence
Exercise 7.2 from Python for Informatics:
Write a program to prompt for a file name, and then read through
the file and look for lines of the form:
...
2
votes
1
answer
611
views
Unique Email Addresses
The task
was taken from leetcode
Every email consists of a local name and a domain name, separated by
the @ sign.
For example, in [email protected], alice is the local name, and
leetcode....
1
vote
2
answers
969
views
Find the smallest distance between any two given words in a string
The task:
Find an efficient algorithm to find the smallest distance (measured in
number of words) between any two given words in a string.
For example, given words "hello", and "world" and a ...
4
votes
1
answer
256
views
Regex to find variants of "Google"
From the HackerRank question definition:
The word google can be spelled in many different ways.
E.g. google, g00gle, g0oGle, g<>0gl3, googl3, GooGIe etc...
Because
g = G
o = O ...
3
votes
0
answers
1k
views
Given an input string and a pattern, implement wildcard pattern matching
I have been trying to solve "Wildcard Matching" on leetcode. I know there are more "manual" ways to solve this without using the RE library. But I would like to know if passing the time limit is ...
10
votes
3
answers
3k
views
Imgur URL parser
Fairly new to Python, and I have been doing a few Edabit challenges, to better help with my problem-solving. I have just completed a some what semi-difficult challenge, and I was hoping for some feed ...
3
votes
1
answer
249
views
Advent of Code 2017, Day 7 - Recursive Circus
This is my solution to Advent of Code 2017, Day 7 – Recursive Circus (both parts, you might not be able to see the second part unless you're logged in and solved the first part, but I'll summarize it ...
2
votes
0
answers
614
views
Leetcode 10: Regular Expression Matching
Problem statement
Implement regular expression matching with support for '.' and '*'.
'.' Matches any single character.
'*' Matches zero or more of the preceding element.
The matching ...
0
votes
2
answers
4k
views
Matching whitespace and non-whitespace characters with RegEx
I just started watching some regex tutorials on Plural Sight just to learn how to write a proper regex expression. So far so good, it's been alright and I decided to test my knowledge on Hackerrank. ...
4
votes
3
answers
213
views
Replacing a string until it matches a certain length
I'm trying to make an SMS Shortner for a kata at Codewars:
Your task is to shorten the message to 160 characters, starting from end, by replacing spaces with camelCase, as much as necessary.
I've ...
4
votes
4
answers
204
views
Advent of Code Day 6: toggling lights in a grid with Powershell
I am using the "Advent of Code" series to help with my PowerShell education. The Day 6 puzzle has a 1000 × 1000 grid of lights. After processing instructions to turn on, turn off, or toggle rectangles ...