String Minipulation

Hi Am trying to manipulate a string

At the moment I make a json call to a server and am returned the following string as an example

clientname/filestore/0000/0000/0000/0076/9403.pdf",

I need to turn this string into the unique id of the file in the above case its - ‘769403’

I need to remove leading 0 and the ‘/’ using regex is a little troublesome

Is there an effective way of doing this?

Hi @barryrodick

You Can split by slash and Taking the SpilTvalue(5).Substring(2)+Splitvalue(6).replace(“.pdf”,“”)

Regards

grafik
without Regex:
grafik

Probably the easiest to implement, however, the regex solution below probably would have worked. I had just started implementing this change.

I accept that this will cause a slight problem in the future if our growth of documents increases to high, but its likely o be a few years away and likely replaced these systems by then

Hi @barryrodick

Always Optimal solution would be provided by @ppr

Regards

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.