by wruza · 5y ago · 0 comments
-> start_of_line
-> literal('Flippers')
-> literal(':')
-> optional
-> whitespace_char
-> end
-> remember
-> multiple
-> digit;
I literally can’t parse this as a whole. /^Flippers:\s?(\d+)/ is so much more obvious compared to that utter nonsense. /(\([^()]\|\n\)*\n\([^()]\|\n\)*)
This was from two days ago. I think I was searching a huge sheet of regex match groups for any having line breaks to join. In a month, I'm not even sure I would recognize that I had authored this.In regex parlance, \d+ explicitly allows for one or more digits. Multiple tacitly implies 2 or more which would be \d{2,}
Also, your end char (which I assume you mean $) would be after the remember -> one_or_more -> digit;
That ‘end’ thing just closes the ‘optional’ group, I believe. There is no $ in an English form of this regex either.