Previous: 22-DataVis.html
document.querySelector('video').playbackRate = 1.2
https://en.wikipedia.org/wiki/Wildcard_character
https://en.wikipedia.org/wiki/Glob_(programming)
* In software, a wildcard character is a kind of placeholder represented
by a single character, such as an asterisk (), which can be
interpreted as a number of literal characters or an empty string.
It is often used in file searches so the full name need not be
typed.
List all python files in the current directory:
ls *.py
List files that have any character in the 4th position:
ls wha?.py
Some common ones include:
| symbol | match |
|:——-|:—————————————————————————–|
| * | matches any number of any characters including no characters
|
| ? | matches any single character |
| [abc] | matches one character given in the bracket |
| [a-z] | matches one character from the (locale-dependent) range given
in the bracket |
https://docs.python.org/3/library/glob.html
import glob # for pathnames only, not general strings
A regular expression (shortened as regex or regexp, also referred to
as rational expression) is a sequence of characters that define a search
pattern. Usually such patterns are used by string-searching algorithms
for “find” or “find and replace” operations on strings, or for input
validation.
* https://en.wikipedia.org/wiki/Regular_expression
* https://docs.python.org/3/howto/regex.html
* https://docs.python.org/3/library/re.html
* https://www.debuggex.com/cheatsheet/regex/python (show)
* http://v4.software-carpentry.org/regexp/index.html
*
https://stackoverflow.com/questions/452104/is-it-worth-using-pythons-re-compile
Regular expressions are sometimes jokingly referred to as “write-only”, a ploy on filesystem permissions like read-only.
Some people, when confronted with a problem, think:
“I know, I’ll use regular expressions.”
Now they have two problems.
+++++++++++++++ Cahoot-23.1
https://mst.instructure.com/courses/58101/quizzes/57595
Next: 24-EvilEval.html