Regular expressions - result


It’s been awhile but need to ask this question. I have a string that I would to use regex to perform search in that string.

String input:
This is a test from Text1 text 2 text3.

In the input string, I would like to search for ‘’ and I want it to provide the entire result as '[EMAIL=“”]’[/EMAIL] Is there a function that I can use in my flow?

Hi pthcincy,
U can get that function by using the flowservice named indexOf under For eg. Input text is

subString Inputs
instring --> String input
beginIndex --> point from where in the input string will be the substring will start
Endindex --> end point of the INput string or End point of the Search string ur looking for


How does that work when you don’t know the beginIndex and Endindex? What if the input string is test1 test2 test3.

I want to search “” and I want the output to be “

// pipeline
IDataCursor pipelineCursor = pipeline.getCursor();
String inputString = IDataUtil.getString( pipelineCursor, “inputString” );
String regexString = IDataUtil.getString( pipelineCursor, “regexString” );

ArrayList x=new ArrayList();

Pattern pat;
Matcher mat;


// pipeline
IDataCursor pipelineCursor_1 = pipeline.getCursor();
IDataUtil.put( pipelineCursor_1, “matchingwods”, x.toArray() );

For input string provide String input:

for regex provide [^" "]

The problem is output will be list of objects not in string format.

There is also the service PSUtilities.regex:find in PSUtilities with the same inputs.

If it is definitive that there is going to be only one email address present in the input string then this should work :

String domainString =; 

and you can get it as a string.