4 ms·
In the past I've used kodos, but as time has gone on I've needed it less and less: http://kodos.sourceforge.net/ http://kodos.sourceforge.net/ As a result I'm
by zwischenzug 10y ago
In the past I've used kodos, but as time has gone on I've needed it less and less:
http://kodos.sourceforge.net/ http://kodos.sourceforge.net/
As a result I'm not into the idea of such a visualisation; you should be using regexps all the time, and internalising the rules. When that's not enough you have to go and read up. I'm not sure such a visualisation will help that much in those non-regular cases, simply because they won't always be available to hand.
- nv-vn 10y ago>you should be using regexps all the time Personally, I try to limit my usage as much as possible. Regexes are basically only useful for things I do in my terminal and occasionally verifying that data is well-formed. For practical parsing, it's almost always better (and runs faster) to use a more robust solution like parser combinators or lexer/parser generators. Even oftentimes for things that are seen as perfect regex use-cases (validating data or splitting strings), using a parsing solution will work better -- for example, you can't be sure that all the numbers in your data are small enough to not overflow the integers using regexes alone (or at least not without resorting to extremely long and unreadable regexes). Regexes are a tool that's easy to reach for, but a lot of the time it's a tool that will end up breaking on you eventually.
- zwischenzug 10y agoI use :s%/search/replace/g very very often (for example).
- rjeli 10y agofor those following along in ex, it should be :%s/foo/bar/g
- zwischenzug 10y agoOops :)
- dsjoerg 10y agowhy should i be using regexps all the time?
- zwischenzug 10y agoIf you have no need to, then don't. I use vim and grep etc and must write simple regexps dozens if not hundreds of times a day.