5
I am trying to make a regular expression on Oracle with the following requirement:
- End with a specific letter if you have this letter in the middle not searching.
- Return the first 3 digits of the string.
To solve the first problem I can use:
a\b
The "a" being the letter, the \b
to pick up a border position after the letter.
To solve the second problem, that is, return the first 3 digits:
^(...){1,1}
Now how do I put the two conditions together? Or the way I’m doing wouldn’t work?
Examples, which end with the letter "a," and I need the first three to return:
anhAnguera
probluff
perGunta
OBS.:
{1,1}
is doing nothing, for default it will capture 1 time, and as its repetition is limited to minimum 1 maximum 1, the effect is the same staying only^(...)
REGEX101– Guilherme Lautert
Thank you William
– David