text stringlengths 1 81 | start float64 0 10.1k | duration float64 0 24.9 |
|---|---|---|
a DOT and then when you want to say or | 1,149.64 | 4.36 |
more use another Dot and then the star | 1,151.559 | 5 |
so equivalent to dot plus would have | 1,154 | 5.28 |
been dot dotar because the first dot | 1,156.559 | 5.161 |
means any character and the second pair | 1,159.28 | 5 |
of characters dotar means zero or more | 1,161.72 | 4.28 |
other characters and to be clear it does | 1,164.28 | 3.44 |
not have to be the same character just | 1,166 | 4 |
by doing Dot or Dot star does not mean | 1,167.72 | 5.439 |
your whole username needs to be a or a A | 1,170 | 6.679 |
or a AA or A A AA it can vary with each | 1,173.159 | 7 |
symbol it just means zero or more of any | 1,176.679 | 5.801 |
character back to back so I could do | 1,180.159 | 3.801 |
this on both the left and the right | 1,182.48 | 3.6 |
which one is better you know it depends | 1,183.96 | 3.92 |
I think a an argument could be made that | 1,186.08 | 3.76 |
this is even more clear because it's | 1,187.88 | 3.279 |
obvious now that there's a DOT which | 1,189.84 | 3.28 |
means any character and then there's the | 1,191.159 | 3.76 |
dot star but if you're in the habit of | 1,193.12 | 3.919 |
doing this frequently one of the reasons | 1,194.919 | 4.441 |
things like the plus exist is just to | 1,197.039 | 3.841 |
consolidate your code into something a | 1,199.36 | 3 |
little more succinct and if you're | 1,200.88 | 3.159 |
familiar with seeing the plus now maybe | 1,202.36 | 3.439 |
this is more readable to you so again | 1,204.039 | 3.52 |
just like with python more generally | 1,205.799 | 3.281 |
you're going to often see different ways | 1,207.559 | 3.041 |
to express the same patterns and | 1,209.08 | 2.959 |
reasonable people might agree or | 1,210.6 | 4.4 |
disagree as to which way is better than | 1,212.039 | 5.321 |
another well let me propose to that we | 1,215 | 4.44 |
can think about both of these models a | 1,217.36 | 3.64 |
little more graphically if this looks a | 1,219.44 | 2.92 |
little cryptic to you let me go ahead | 1,221 | 4.12 |
and Rewind to the previous incarnation | 1,222.36 | 4.36 |
of this regular expression which was | 1,225.12 | 4.32 |
just a single dot star this regular | 1,226.72 | 6.12 |
expression doar at doar means what again | 1,229.44 | 5.16 |
it means zero or more characters | 1,232.84 | 3.8 |
followed by a literal at sign followed | 1,234.6 | 4.12 |
by zero or more other characters now | 1,236.64 | 3.519 |
when you pass this pattern in as an | 1,238.72 | 3.76 |
argument to re. search it's going to | 1,240.159 | 4.681 |
read it from left to right and then use | 1,242.48 | 5.16 |
it to try to match against the input | 1,244.84 | 4.8 |
email in this case that the user typed | 1,247.64 | 5.08 |
in now how is the computer how is re. | 1,249.64 | 5.6 |
search going to keep track of whether or | 1,252.72 | 4.36 |
not the user's email matches this | 1,255.24 | 3.559 |
pattern well it turns out that that it's | 1,257.08 | 3.56 |
going to be using a machine of sorts | 1,258.799 | 3.321 |
implemented in software known as a | 1,260.64 | 3.8 |
finite State machine or more formally a | 1,262.12 | 4.799 |
non-deterministic finite automaton and | 1,264.44 | 3.96 |
the way it works if we depict this | 1,266.919 | 4.481 |
graphically is as follows the re. search | 1,268.4 | 5.72 |
function starts over here in a so-called | 1,271.4 | 4.399 |
start State that's the sort of condition | 1,274.12 | 3.6 |
in which it begins and then it's going | 1,275.799 | 3.961 |
to read the user's email address from | 1,277.72 | 4 |
left to right and it's going to decide | 1,279.76 | 3.76 |
whether or not to stay in this first | 1,281.72 | 4.52 |
state or transition to the next state so | 1,283.52 | 4.72 |
for instance in this first state as the | 1,286.24 | 4.4 |
user is reading my email address maen | 1,288.24 | 5.039 |
harvard.edu it's going to follow this | 1,290.64 | 5.24 |
curved edge up and around to itself a | 1,293.279 | 4.601 |
reflexive Edge and it's labeled dot | 1,295.88 | 3.399 |
because dot again just means any | 1,297.88 | 3.96 |
character so as the function is reading | 1,299.279 | 4.4 |
my email address mail at harvard.edu | 1,301.84 | 4.88 |
from left to right it's going to follow | 1,303.679 | 9.48 |
these transitions as follows m a l a n | 1,306.72 | 8.319 |
and then it's hopefully going to follow | 1,313.159 | 4 |
this transition to the second state | 1,315.039 | 4.081 |
because there's a literal at sign both | 1,317.159 | 3.88 |
in this machine as well as in my email | 1,319.12 | 3.32 |
address then it's going to try to read | 1,321.039 | 8.281 |
the rest of my address h a r v a r d. e | 1,322.44 | 9.68 |
du and that's it and then the computer's | 1,329.32 | 5.04 |
going to check did it end up in a an | 1,332.12 | 4.439 |
except State a final State that's | 1,334.36 | 3.76 |
actually depicted here pictorially a | 1,336.559 | 3.521 |
little differently with double circles | 1,338.12 | 3.48 |
one inside of the other and that just | 1,340.08 | 4.16 |
means that if the computer finds itself | 1,341.6 | 5.64 |
in that second accept state after having | 1,344.24 | 5.84 |
read all of the users input it is indeed | 1,347.24 | 5.679 |
a valid email address if by some chance | 1,350.08 | 4.56 |
the machine somehow ended up stuck in | 1,352.919 | 3.321 |
that first state which does not have | 1,354.64 | 3.039 |
double circles and it is therefore not | 1,356.24 | 3.12 |
an accept state the computer would | 1,357.679 | 3.88 |
conclude this is an invalid email | 1,359.36 | 5.12 |
address instead by contrast if we go | 1,361.559 | 4.48 |
back to my other version of the code | 1,364.48 | 4.319 |
where I instead had Plus on both the | 1,366.039 | 4.681 |
left and the right recall that re. | 1,368.799 | 3.321 |
search is going to use one of these | 1,370.72 | 3.559 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.