Want to get involved? We're always looking for ideas and content for Weekly Challenges.
SUBMIT YOUR IDEAA very interesting problem which required a bit of a different solution. Managed to validate the final answer as well.
In looking at other solutions, it looks like I could have streamlined this some.
Can you explain (?<=\w) . I have seen "?" in a formula before but do not understand it. I see it is taking a word and i have seen the same formula take several words.
in challenge #37 I am lost with this :
The formula of the solution for challenge #37 is as follows (I had to look as I was very stuck and re-watching training over and over was not helping)
(\d{7})(.*?)\s(\w+)\s\((.*)\).*CAT:(.*) PUB:(.*?)\s\$(.*)
(\d{7})= first 7 digits this on is easyJ
(.*?)\s(\w+)\s\((.*)\) = the game name ? and year, this part is confusing me. I see \((.*)\ this is identifying the date. Why not \(\d{4})\. Before the date (xxxx) I do not see how the formula is parsing the name and separating out the platform. The last \s I assume is the space before the date (xxxx) but I do not know what (.*?) is. I see ?: in the menu but not a ? by itself. To me this reads “any character and zero more” space \s “word and more letters” \w+. how is that saying WII Sports as a name and then NES as a publisher?
Later in the formula they use (.*?) after “PUB:”, here like at the beginning I do not see how it is pulling one word with no punctuation where at the beginning it seems to be pulling multiple words with punctuation.
Then at the end $(.*) is pulling multiply sets of numbers.
I went back through the regex training several times but cannot seem to locate these specific formula types.
Sorry for posting in the challenge, but it popped out at me. a moderator can move this if need be.