Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Regex Golf: It Never Ends

Tags:

regex

I've been teaching myself regex for fun and I'm having real trouble moving past this level in Regex Golf. I know this can be done with a $, but the game is asking you not to do that. Any pointers or suggestions?

I've tried ([/w](fu)), [/w][fu][^/w] and a few others

https://alf.nu/RegexGolf

Challenge Link

like image 654
stk1234 Avatar asked Jul 13 '17 14:07

stk1234


2 Answers

You can try to use fu\b. \b means match the word's border.There is a picture to show how to match the borders. enter image description here

like image 175
canaanhhh Avatar answered Sep 23 '22 13:09

canaanhhh


The shortest regex for this question is u\b. You don't need the f :)

like image 25
D G Avatar answered Sep 22 '22 13:09

D G