View updated list here
This page is limited to NFL endpoints but can be refashioned for other sports leagues (i.e. /sports/football/leagues/nfl/
=> /sports/baseball/leagues/mlb/
)
/* tooltip.css */ | |
.container { | |
position: relative; | |
} | |
.help-icon { | |
cursor: pointer; | |
position: relative; | |
margin-left: 5px; |
View updated list here
This page is limited to NFL endpoints but can be refashioned for other sports leagues (i.e. /sports/football/leagues/nfl/
=> /sports/baseball/leagues/mlb/
)
const data = [12, 23, 38, 40, 54, 62, 71, 87, 99]; | |
const binarySearch = (arr, num, left, right) => { | |
let middle = Math.floor((left + right) / 2); | |
// range overlapped, so never found number | |
if (left > right) { | |
return -1; | |
} | |
else if (num === arr[middle]) { |
/^([a-z0-9_.-]+)@([\da-z.-]+).([a-z.]{2,6})$/
Now that we have a general idea how Regex works (visit my simple Regex tutorial). Let's break down what's happening in the Email Regex example above.
The anchor used in this regex for email is the ^
, which indicates the beginning of a string and the $
, indicating the end of a string. Next, lets focus our attention to the (grouping/capturing which occurs between parenthesis)
. In group one, (remember group zero is the whole entity together as one) we see ([a-z0-9_\.-])
. This matches the email name. Furthermore, we can tell because inside the brackets, it is matching any character in the range "a" to "z", any digits 0-9, underscore character which matches _ , the \ indicates an excape matching a . , and last the - character matching a -. Next, we noticed what every email has the @
symbol, which means without this matching, it wouldn't be an email! We move to