Close popover
Manuela Blümel (ManuelaB)
metafinanz Informationssysteme GmbH

metafinanz Informationssysteme GmbH
ManuelaB Member since 2015 2 posts
metafinanz Informationssysteme GmbH
Posted: March 1, 2016
Last activity: March 11, 2016

Java function works in Eclipse but not in Pega 7.1.7

Hi there,

I created a Java method in Pega which finds and replaces the date for "Current Date" within a text (String). Everything is working fine as long as I am using as an input for the function a simple text.

During runtime when the method gets called it should replace the date for "Current Date" within a HTML code. In this situation the date gets not replaced in Pega (the function works then still fine in Eclipse).

My java function:

String regexPattern = "Current Date: [0-9]?{6}";

java.util.regex.Pattern myPattern = java.util.regex.Pattern.compile(regexPattern);

java.util.regex.Matcher myMatch = myPattern.matcher(originText);

return myMatch.replaceAll("Current Date: " + replacementText);

I guess that there could be a problem with one of the characters of the HTML code in Pega.

Has anyone a suggestion how to solve this issue?

Many thanks in advance and regards,


Pega Customer Service Low-Code App Development
Moderation Team has archived post,
Close popover This thread is closed to future replies. Content and links will no longer be updated. If you have the same/similar Question, please write a new Question.