regex Flashcards

1
Q

what’s the standrad regex path ?

A

compile –> search –> group/start/end/span()

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

what function will you use to obtain the matched regex strng (note this may not be the same as the regex expression, especially if regex expression is generic to refer to multiple strings)

A

group

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

what function will you use to indicate the starting postion of the match?

A

start()

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

what function will you use to indicate the ending position of the match?

A

end()

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

how do you return both the starting and ending position using a tuple?

A

span

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

how will you look for multiple matches?

A

compile –>finditer–>match –> group/start/end/span

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