VerbalExpressions – JavaScript library that helps construct regular expressions(github.com)
github.com
VerbalExpressions – JavaScript library that helps construct regular expressions
https://github.com/jehna/VerbalExpressions#
4 comments
I kind of know regular expressions but every time I have to write one I head off to regexpal to write it. For instance, off the top of my head, I have no idea what the "?" in the parenthesis does. Usually expect a character to precede a "?", "." or "*".
I also don't use them often enough to commit all the rules to memory.
However, given VerbalExpressions, I don't think I'd have a problem building regular expressions. For a newbie, startOfLine and endOfLine is far more memorable than "^" and "$".
> Which you should if you are a programmer.
You can be pretty productive programmer without knowing regular expressions. Depends on the kind of programming you do really.
I also don't use them often enough to commit all the rules to memory.
However, given VerbalExpressions, I don't think I'd have a problem building regular expressions. For a newbie, startOfLine and endOfLine is far more memorable than "^" and "$".
> Which you should if you are a programmer.
You can be pretty productive programmer without knowing regular expressions. Depends on the kind of programming you do really.
There are ten thousand things I "should" know as a programmer. And I use regular expressions about once per year, which is long enough for them to become unreadable between usages, and require me to spend a chunk of time looking up syntax for even the simplest of them.
i could see it useful if you had a situation where you need to programmatically generate a regex, but i don't really see myself using it much at all.
I have always struggled writing a regular expressions. Even after being successful in writing one, I could not retain what it did once I returned to it. This library is definitely for people like me.
Damn, this is so simple yet so powerful I can't believe it's the first time anyone has thought about it.
> I can't believe it's the first time anyone has thought about it.
Implying this is?
Implying this is?
Not implying that, but haven't seen something as similar and high-level before.
As a diabetic, I try and not over-dose on syntactic sugar...
is way more succinct and just as easy to read as:
Well... assuming you know regular expressions. Which you should if you are a programmer.