I'm looking at someone else's code which I do not have the option of running and can't figure out what the following REGEXP_LIKE is trying to match. Any help would be appreciated.
REGEXP_LIKE('field_name', '^(ABC:)?Z[DEF]')
What I think is happening is as follows but I think I am wrong:
Try to match any field that:
begins with ABC: and ends D, E or F
I understand that the ^ matches the beginning of a string and that the () brackets group the expressions so is therefore grouping ABC:
However the ?Z is what is confusing me.
Any help would be appreciated, I can't seem to get my head around this no matter how many articles I read.