cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

regex for "\n"

gopikrishnanr
Organizer

Hi,

Can anyone tell me how to handle \n in transformation regex. My value is like below with space, tab and new line :

I want to capture the Success between 1 and 2 from these whole data. How to design regex for that?

Regards,

Gopikrishnan

5 REPLIES 5

Hi Gopikrishnan,

Is this snapshot from return value of method or some log lines (what's up with Timestamps)? Or can you post the full snapshot of return value? Or text samples?

You can use the regex \s* to skip the space characters out of selection.

Also try checking the Ignore White Spaces to see it works.

Regards, Rajesh.

gopikrishnanr
Organizer

Hi Rajesh,

The snap is argument of a method and below is the full snap. I checked with Ignore white space but no luck. Please suggest how to capture it.

Can you pl. attach sample text, as I can't type the text?

Hi Rajesh,

Please find attached in file the sample text since the spaces are not proper below :

 2017-05-29 12:21:18.613Process eapp number : Exxxxxxxxxxxxxx4
2017-05-29 12:21:18.6131. Process submit to CAS
2017-05-29 12:21:35.758 - Success
2017-05-29 12:21:35.7582. Process triger BPM
2017-05-29 12:21:36.897 - Success
2017-05-29 12:21:36.8973. Process Upload iEDMS Documents
2017-05-29 12:21:37.147 - Failed :
2017-05-29 12:21:37.1474. Process Upload New Documents
2017-05-29 12:21:37.1475. Process Update Status into sent to UW
2017-05-29 12:21:37.147 - Success

Thanks


Hi Gopikrishnan,


Try out this and see it it works for you:


(?!=:\d\d\.\d\d\d\s+-\s+)(Success).*

Here is in-regex filter that can help you capture the Success Tag in whatsoever line in log return value:

(?s).*Process submit to CAS.*?(Success).*

(?s).*Process triger BPM.*?(Success).*

(?s).*Process Upload iEDMS Documents.*?(Success).*

(?s).*Process Update Status into sent to UW.*?(Success).*

Hope it helps.