Question

Extraction not working as expected in RUTA script

I am trying to extract below format using RUTA script:

Example -

Input - the quote number is A1-A123123PAD with AB-1231231-PAD

Exp O/p - PAD

The script that I provided is not working as expected and its working fine in online REGEX builder.

https://regex101.com/r/EZf2DP/2 - Online REGEX code.

RUTA Script:

PACKAGE uima.ruta.example;

Document{->RETAINTYPE(SPACE)};

"\\b[1]{0,1}[A-Z0-9]{2}[\\s ||-]{0,2}[A-Z0-9]{7}[\\s ||-]{0,2}[A-Z]\\K{3})\\b" -> EntityType;

Comments

Keep up to date on this post and subscribe to comments