text
stringlengths
1
81
start
float64
0
10.1k
duration
float64
0
24.9
characters in the world except for the
2,768.96
4.28
at symbol so let's actually narrow the
2,770.8
3.72
definition of what we're going to
2,773.24
3.56
tolerate in usernames and companies like
2,774.52
4.839
Gmail could certainly do this as well
2,776.8
4.16
suppose that it's not just that I want
2,779.359
4.121
to exclude at sign suppose that I only
2,780.96
5.159
want to allow for say characters that
2,783.48
4.76
normally appear in words like letters of
2,786.119
4.521
the alphabet A through Z be it uppercase
2,788.24
4.8
or lowercase maybe some numbers in heck
2,790.64
3.919
maybe even an underscore could be
2,793.04
4.079
allowed to well we can use this same
2,794.559
4.8
square bracket syntax to specify a set
2,797.119
5.281
of characters as follows I could do a b
2,799.359
6.2
c d e f g h i j oh my God this is going
2,802.4
4.24
to take forever I'm going to have to
2,805.559
3.681
type out all 26 letters of the alphabet
2,806.64
4.719
both lowercase and uppercase so let me
2,809.24
3.76
stop doing that there's a better way
2,811.359
3.76
already if you want to specify Within
2,813
5.119
These square brackets a range of letters
2,815.119
5.641
you can actually just do a hyphen if you
2,818.119
6.081
literally do a hyphen Z in these square
2,820.76
5.359
brackets the computer is going to know
2,824.2
4.08
you mean a through z you do not need to
2,826.119
4.761
type 26 letters of the alphabet if you
2,828.28
4.36
want to include uppercase letters as
2,830.88
4.239
well you just do the same no spaces no
2,832.64
5
commas you literally just keep typing a
2,835.119
5.881
through capital Z so I have little a
2,837.64
7
hyphen little Z big a hyphen big Z no
2,841
6.04
spaces no commas no separators you just
2,844.64
4.56
keep specifying those ranges if I
2,847.04
4.72
additionally want numbers I could do 0 1
2,849.2
4.68
2 3 4 NOP you don't need to type in all
2,851.76
4.96
10 decimal digits you can just say 0
2,853.88
5.4
through n using a hyphen as well and if
2,856.72
4.68
you now want to support underscores as
2,859.28
3.64
well which is pretty common in user
2,861.4
3.24
names for email addresses you can
2,862.92
4.24
literally just type in underscore at the
2,864.64
5.16
at the end notice that all of these
2,867.16
5.48
characters are inside of square brackets
2,869.8
5.44
which just again means here is a set of
2,872.64
5.12
characters that I want to allow I have
2,875.24
5.359
not used a carrot symbol at the
2,877.76
4.599
beginning of this whole thing because I
2,880.599
3.921
don't want to complement it complement
2,882.359
4.681
it with an E not complement it with an i
2,884.52
4.12
I want don't want to complement it by
2,887.04
3.84
making it the opposite I literally want
2,888.64
4.919
to accept only these characters I'm
2,890.88
4
going to go ahead and do the same thing
2,893.559
4.161
on the right if I want to require that
2,894.88
5.199
the domain name similarly come from this
2,897.72
4.2
set of characters which admittedly is a
2,900.079
3.601
little too narrow but it's familiar for
2,901.92
3.6
now so we'll keep it simple I'm going to
2,903.68
3.84
go ahead and paste that exact same set
2,905.52
5.079
of characters over there to the right
2,907.52
6.28
and so now it's much more restrictive
2,910.599
5.041
now I'm going to go ahead and run python
2,913.8
3.559
of validate I'm going to test my own
2,915.64
3.919
email address and we're still good I'm
2,917.359
3.921
going to clear my screen and run it once
2,919.559
5.321
more this time trying to break it let me
2,921.28
6.72
go ahead and do something like how about
2,924.88
7.64
davidor maen harvard.edu enter but that
2,928
7.319
too is going to be valid but if I do
2,932.52
6.319
something completely wrong again like ma
2,935.319
6.841
harvard.edu that's still going to be
2,938.839
5.401
invalid why because my regular
2,942.16
4.12
expression currently only allows for a
2,944.24
4.119
single at in the middle because
2,946.28
4.319
everything to the left must be alpha
2,948.359
5.081
numeric alphabetical or numeric or an
2,950.599
5.441
underscore the same thing to the right
2,953.44
6.24
followed by the edu now honestly this is
2,956.04
5.44
a regular expression that you might be
2,959.68
3.879
in the habit of typing in the real world
2,961.48
4.4
as in as cryptic as this might look this
2,963.559
4.28
is the world of regular Expressions so
2,965.88
3.32
you'll get more comfortable with this
2,967.839
3.96
syntax over time but thankfully some of
2,969.2
5
these patterns are so common that there
2,971.799
5.04
are builtin shortcuts for representing
2,974.2
4.96
some of the same information that is to
2,976.839
4.401
say you don't have to constantly type
2,979.16
3.919
out all of the symbols that you want to
2,981.24
3.28
include because odds are some other
2,983.079
3.401
programmer has had the same problem so
2,984.52
3.96
built into regular Expressions
2,986.48
3.839
themselves are some additional patterns
2,988.48
4.56
you can use and in fact I can go ahead
2,990.319
5.52
and get rid of this entire set a through
2,993.04
5.319
z lowercase A through Z uppercase 0
2,995.839
4.601
through 9 in an underscore and just
2,998.359
5.641
replace it with a single back slw back
3,000.44
6.119
slw in this case represents a word
3,004
5.28