I need help with a java udf
context udf : array of texts will be passed to udf
text1 : This is a purchase order number 111111....# and date is 10/02
text2: purchase order number 222..# and date is 10/03
In all these texts being passed to the udf,we need to extract the string : purchase order 11111...
so basically the substring needs to be extracted "purchase order 11111... " . Anything between purchase order... and #: the substring needs to be extracted.
The substring extracted is dynamic in length : purchase order ..... : can be of any length.
Gaurav Bhargava replied
This is a purchase order number 11111 #
in this "purchase order" is 11 but for your requirement to get only 1111 out of the above string you need to keep "purchase order number" into the code i provided above instead of "purchase order"
Secondly for your requirement of the above string you can incorporate
int start = input.toLowerCase().indexOf("purchase order");