▲ 2 r/regex
Challenge: “Complete the chevrons” (For the fun)
This one is moderately easy if you know the syntax. :)
Let’s say not all the chevrons have been written, sometimes it has been the case, sometimes not…
First, what should match:
<1 (the chevron on the right has been forgotten)
2> (the chevron on the left has been forgotten)
<3> (Even if you don’t do anything, it should be considered)
Then, what shouldn’t match:
4 (there’s no chevron at all, it’s impossible to tell if the chevrons should be there)
So this is the challenge: change the writing to put one chevron on the left et one chevron on the right:
From: <<1 2> 3 <4>
To: <1> <2> 3 <4>
u/Chichmich — 10 days ago