How does /(bb|[^b]{2})/ work?
/(bbb2)/
How does that turn to “To end up being or not to ever be”
Well, it’s a certain amount of a stretch out, but it could be interpreted like that.The a couple of slashes represent an “expression”.That parentheses enclose an alternation, which is denoted with the vertical standard.The “bb” is usually obviously “2b”.The caret because the first character of the list inside square mounting brackets means “not just about any of these”.Because the only thing inside the list is actually “b”, it means not necessarily “b”.The “2” with curly brackets means the previous thing (what’s inside the square brackets) twice, so that’s the “not 2b”.So it’s
bb “To be”
“or”
b2 “not to be”.
Leave a Reply
You must be logged in to post a comment.