14. Mining text to find meaningful data Flashcards
What function returns data on the length of a string?
char_length() with
What does the function char_length() return
The number of characters in a string including spaces
If I want to identify a substring what function could I use?
position(**substring ** in string)
SQL
What function can remove the beginning and ending of a string?
trim(characters from string)
SQL
If I wanted to remove the letter s from string. What fucntion would I use and how would I set it up?
trim( āsā from string)
If I only want to remove the first letter only what parameter do I use?
trim()
leading
If I want to remove only the last letter in a string what agrument would I use?
trim()
trailing
What are Regular expressions?
they are a type of notational language that describes text patterns
what is a type of notational language that describes test patterns
regular espressions
Expression: .
a dot is a wildcard that finds any character except a newline.
Expression [FGz]
any character in square brackets []
Expression: [a-z]
a range of characters. Here lowercase a to z
Expression: [^a-z]
Regular expressions
the caret negates the match. Here not losercase a-z
RE: \w
any word character or underscore. Same as [A-Za-z0-9]
RE: \d
any digit