I have this text:
SYS.DBMS_SCHEDULER.RUN_JOB('CALCULO_AGIL_DT_POSTO');
I need this text:
CALCULO_AGIL_DT_POSTO
I have this regex in PHP:
'(?<=SYS\.DBMS_SCHEDULER\.RUN_JOB\()[^'].*(?<=\))
but it does not work properly.
I have this text:
SYS.DBMS_SCHEDULER.RUN_JOB('CALCULO_AGIL_DT_POSTO');
I need this text:
CALCULO_AGIL_DT_POSTO
I have this regex in PHP:
'(?<=SYS\.DBMS_SCHEDULER\.RUN_JOB\()[^'].*(?<=\))
but it does not work properly.
I can't see the need for a look ahead here.
Just make a simple pattern like this:
$pattern = "/SYS\.DBMS_SCHEDULER\.RUN_JOB\([\'\"](.*?)[\'\"]\)\;/";
It will match what is in exactly this string between the (
and '
.
I made it lazy just in case it finds another ')
somewhere else.
https://regex101.com/r/c9Kl3E/2
Edit noticed now in your title you need to be able to match both '
and "
.
Added that to the regex [\'\"]