4 ms·
What I like about regex is that it's kinda "cross platform". I always though that one could make a markup (like markdown) based on regex . Then you could almos
by geokon 5y ago
What I like about regex is that it's kinda "cross platform".
I always though that one could make a markup (like markdown) based on regex . Then you could almost directly parse it in any language environment. I'm not sure what the major drawbacks would be though. I guess the expression could get hairy pretty fast as you handle edge cases :)
- JadeNB 5y ago> I always though that one could make a markup (like markdown) based on regex . Then you could almost directly parse it in any language environment. I'm not sure what the major drawbacks would be though. I guess the expression could get hairy pretty fast as you handle edge cases :) I'm pretty sure Gruber's original Markdown parser was just regex-based (which is why there are so many weird underspecifications and corner cases). Or do you mean that somehow the document itself is written in a flavor of regex? I'm intrigued but puzzled: what would that even look like?
- geokon 5y agooh no, I meant the former. I guess it's just come from my personally use of orgmode day to day - which is great feature-wise but has no spec and I'm shackled to Emacs/Elisp. It just feels like things could have been designed better from the getgo. And markup is something that at least at face value simple enough that you could achieve what you want without a full parser/grammar even though regex isn't quite crossplatform/standardized - it's much more standard than any way of expressing grammars
- JadeNB 5y agoBNF is pretty standard, no? Maybe I just haven't seen enough of the ways it is surely abused in the wild ….
- geokon 5y agoI've honestly never come across it since university - but maybe that's me being a noob. I don't get the impression it's as copy-n-paste as regex. and well every lang has regex