Click here to Skip to main content
15,905,316 members

Comments by Pam04 (Top 4 by date)

Pam04 27-Nov-23 11:05am View    
Thank you, will save the link for future!
Pam04 27-Nov-23 10:55am View    
Thank you so much for all the links to tools and information. I will save for future.
I had tried this tool ((https://www.freeformatter.com/regex-tester.html) before trying in my JPO. But what worked in the tool didn't work in my JPO.
Pam04 27-Nov-23 10:52am View    
This one replaced the entire test output with <hashname>
I tried below and it worked!

getReplacementMap().put("regex:[a-zA-Z0-9]+/[a-zA-Z0-9]+/[a-zA-Z0-9_-]+[_-]+[a-zA-Z0-9_-]+[^.]+\\.[a-zA-Z0-9]+", "<hashname>");

Thank you Andre.
Pam04 27-Nov-23 10:50am View    
This gave a very close solution. The path gets generated every time, so obviously the directories will be different.
When I tried your regex, it substituted as below...

d7/<hashname>

The first dir name was not substituted. So I tried below which worked!!

getReplacementMap().put("regex:[a-zA-Z0-9]+/[a-zA-Z0-9]+/[a-zA-Z0-9_-]+[_-]+[a-zA-Z0-9_-]+[^.]+\\.[a-zA-Z0-9]+", "<hashname>");

Thank you so much Manish!