text
stringlengths
1
81
start
float64
0
10.1k
duration
float64
0
24.9
dollar sign here at the end that does
2,055.44
4
not mean I want the user to type a
2,057.679
3.881
carrot symbol or a dollar sign this is
2,059.44
5.12
special symbology that indicates to re.
2,061.56
5.079
search that it should only look for now
2,064.56
5
an exact math against this pattern so if
2,066.639
5.24
I now go back to my terminal window and
2,069.56
3.799
I'll leave the previous result on the
2,071.879
3.641
screen let me type the exact same thing
2,073.359
5.201
my email address is maen harvard.edu
2,075.52
6.2
enter sorry period and now I'm going to
2,078.56
5.799
go ahead and hit enter now that's
2,081.72
4.959
considered invalid but let me clear the
2,084.359
3.681
screen and just to make sure I didn't
2,086.679
3.2
break things let me type in just my
2,088.04
5.639
email address and that too is valid any
2,089.879
6.121
questions now on this version of my
2,093.679
4.841
regular expression which note goes
2,096
5.68
further to specify even more precisely
2,098.52
5.64
that I want it to match at the start and
2,101.68
3.36
the
2,104.16
4.919
end any questions on this one here okay
2,105.04
7.2
you have slash and that edu and then the
2,109.079
6.721
dollar sign but the dot is like uh one
2,112.24
6.32
of the regular expression right it
2,115.8
5.4
normally is but this backslash that I
2,118.56
6.039
deliberately put before this period here
2,121.2
6
is an escape character it is a way of
2,124.599
5.361
telling re. search that I don't want any
2,127.2
4.919
character there I literally want a
2,129.96
4.52
period there and it's the only way you
2,132.119
4.48
can distinguish one from the other if I
2,134.48
4.68
got rid of that slash this would mean
2,136.599
4.441
that the email address just has to end
2,139.16
4.4
with any character then an e then a d
2,141.04
4.52
then a u i don't want that I want
2,143.56
5
literally a period Then the E then the D
2,145.56
5.36
then the U this is actually common
2,148.56
4.64
convention in programming and technology
2,150.92
3.919
in general if you and I decide on a
2,153.2
3.48
convention whereby we're using some
2,154.839
3.28
character on the keyboard to mean
2,156.68
3.919
something special invariably we create a
2,158.119
4.401
future problem for oursel when we want
2,160.599
4.441
to literally use that same character and
2,162.52
4.319
so the solution in general to that
2,165.04
3.799
problem is to somehow escape the
2,166.839
3.361
character so that it's clear to the
2,168.839
3.121
computer that it's not that special
2,170.2
4.32
symbol it's literally the symbol it sees
2,171.96
4.56
so we don't need another we don't need
2,174.52
5.64
another another slash before the dollar
2,176.52
7.36
sign no uh because in this case dollar
2,180.16
5.88
sign means something special per this
2,183.88
4.4
chart here dollar sign by itself does
2,186.04
4.76
not mean US dollars or currency it
2,188.28
4.28
literally means match the end of the
2,190.8
4.96
string if however I wanted the user to
2,192.56
5.68
literally type in a dollar sign at the
2,195.76
4.52
end of their input the solution would be
2,198.24
4.359
the same I would put a backslash before
2,200.28
4.4
the dollar sign which means my email
2,202.599
3.48
address would have to be something like
2,204.68
4.56
maen harvard.edu dollar sign which is
2,206.079
5.961
obviously not correct too so backslashes
2,209.24
5.48
just allow you to tell the computer to
2,212.04
4.88
not treat those symbols specially like
2,214.72
4.359
meaning something special but to treat
2,216.92
4.56
them literally instead how about one
2,219.079
4.481
other question here on regular
2,221.48
4.4
Expressions you said you said one
2,223.56
5.519
represents to to make it one plus then
2,225.88
5.04
you say one was to make it one with
2,229.079
5.321
nothing sure let me rewind in time I
2,230.92
4.72
think what you're referring to was one
2,234.4
3.04
of our earlier versions that initially
2,235.64
4.24
looked like this which just meant Zero
2,237.44
5.24
or more characters than an at sign than
2,239.88
5.479
zero or more other characters we then
2,242.68
5.88
evolved that to be this do Plus on both
2,245.359
4.96
sides which means one or more characters
2,248.56
4.12
on the left then an at sign then one or
2,250.319
4.52
more characters on the right and if I'm
2,252.68
4.08
interpreting your question correctly one
2,254.839
3.641
of the points I made earlier was that if
2,256.76
3.88
you didn't use Plus or forgot that it
2,258.48
4.359
exists you could equivalently achieve
2,260.64
4.32
the exact same result with two dots and
2,262.839
5.041
a star because the first dot means any
2,264.96
5.04
character it's got to be there the
2,267.88
5.4
second dot star means zero or more other
2,270
5.48
characters and same on the right so it's
2,273.28
4.28
just another way of expressing the same
2,275.48
4.879
idea one or more can be represented like
2,277.56
5.559
this with DOT do star or you can just
2,280.359
5.361
use the handier syntax of plus which
2,283.119
4.601
means the same thing all right so I dare
2,285.72
3.599
say there's still some problems with the
2,287.72
3.48
regular expression in this current form
2,289.319
3.52
because even though now we're starting
2,291.2
2.919