14. Mining text to find meaningful data Flashcards

1
Q

What function returns data on the length of a string?

A

char_length() with

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What does the function char_length() return

A

The number of characters in a string including spaces

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

If I want to identify a substring what function could I use?

A

position(**substring ** in string)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

SQL

What function can remove the beginning and ending of a string?

A

trim(characters from string)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

SQL

If I wanted to remove the letter s from string. What fucntion would I use and how would I set it up?

A

trim( ā€˜sā€™ from string)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

If I only want to remove the first letter only what parameter do I use?

trim()

A

leading

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

If I want to remove only the last letter in a string what agrument would I use?

trim()

A

trailing

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are Regular expressions?

A

they are a type of notational language that describes text patterns

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

what is a type of notational language that describes test patterns

A

regular espressions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Expression: .

A

a dot is a wildcard that finds any character except a newline.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Expression [FGz]

A

any character in square brackets []

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Expression: [a-z]

A

a range of characters. Here lowercase a to z

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Expression: [^a-z]

Regular expressions

A

the caret negates the match. Here not losercase a-z

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

RE: \w

A

any word character or underscore. Same as [A-Za-z0-9]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

RE: \d

A

any digit

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

RE: \s

A

a space

17
Q

RE: \t

A

tab character

18
Q

RE: \n

A

new line character

19
Q

RE: \r

A

Carriage return Character

20
Q

RE: ^

A

match at the start of the string

21
Q

RE: $

A

Match at the end of the string

22
Q

RE: ?

A

get the preceding match zero or one time

23
Q

RE: *

A

get the preceding match zero or more times

24
Q

RE: +

A

get the preceeding match one or more times

25
Q

RE: {m}

A

get the preceding match exactly m times

26
Q

RE: {m,n}

A

get the preceding match between m and n times

27
Q

RE: a | b

A

The piple denotes alteration . Find either a or b

28
Q

RE: ()

A

Create and report a capture group or set precendence

29
Q

RE (?: )

A

Negate the reporting of a capture group