Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
C0D4669027yOk found it
You can use “the regex coach” it will break down the regex and explain what it’s doing
Mind you it’s slow but it’s useful
http://www.weitz.de/regex-coach/ -
Root797507yOptimize it by replacing it with a comment. It'll have the same effect. 😞
Just ... ugh. -
stisch46037y@Brosyl oh yes! You're right, the slashes are backwards. I entered it from memory on the Android keyboard, a bit disorienting.
The end result is that it replaces all matches with itself, which means taking the entire line out would have no effect. Some git history investigation revealed it had 'evolved' to that over multiple commits by multiple authors.. some of whom I assume don't understand regular expressions.
Related Rants
What fresh hell is this
.replaceAll("(//"?)([^//d]+)(//.?)([^//d]+)(//.?)([//d]{3})(//.?)([^/d]+)(//"?)","$1$2$3$4$5$6$7$8$9")
...who is fucking with me
rant
wtf
regex
irregular expressions
this line does nothing