Recovering interrupter with occasional relapses, lover of spreadsheets, blogger, programmer, adept debugger, conjurer of analogies, and probably other things.
After my first contact with a computer in the 1980's, I taught myself to program in BASIC and Z80 assembler. I went on to study Computer Science and have enjoyed a long career in Software Engineering.
Now that I'm staring at this chart, I'm recalling that at some point I was trying to parse markdown. Pretty sure this is looking for nested lists:
* Hello!
1. A nested ordered list
Though, it is interesting to me that the initial * or \d\. is not captured; one would think it'd be important to distinguish between an unordered and ordered list...
After my first contact with a computer in the 1980's, I taught myself to program in BASIC and Z80 assembler. I went on to study Computer Science and have enjoyed a long career in Software Engineering.
I studied the screenshot I attached to my comment and came to the same conclusion but it looks to me the expression might be more complicated than it needs to be - without fully understanding the context of course.
Some regex I wrote in 2018:
I've stared at it for 5 minutes and still can't tell you what's happening 🙃
It searches for indented sublists, like:
You're welcome.
Lots of
(?:\*|\d\.)
repeated: non-capture region of either * or (any numeral followed by any character).If you throw the expression into something like Debuggex it can map out the routes through the expression, as follows.
However, whilst this shows what is happening it does not indicate why.
Now that I'm staring at this chart, I'm recalling that at some point I was trying to parse markdown. Pretty sure this is looking for nested lists:
Though, it is interesting to me that the initial
*
or\d\.
is not captured; one would think it'd be important to distinguish between an unordered and ordered list...I studied the screenshot I attached to my comment and came to the same conclusion but it looks to me the expression might be more complicated than it needs to be - without fully understanding the context of course.
Anyone that can read this and know exactly what's going on is clearly not human