You are viewing limited content. For full access, please sign in.

Question

Question

Formatting a number string

asked on December 17, 2015

I have a 19 digit number I got through a pattern match and I need to reformat. I dont know if its possible, but anyway...

I want to take this:

0425210000031000081

and format it to this:

S: 04 T: 25 R: 21 Sub: 0000 Blk: 03100 Lot: 0081

 

0 0

Answer

SELECTED ANSWER
replied on December 17, 2015 Show version history

You could do it through a series of Assign Token Values tools in workflow. regex: \d{2\d{2}\d{2}\d{4}\d{5}\d{4} will give you the ability to separate the 19 digits into the values you need. Just use () around the value you want in the token ie: (\d{2})\d{2}\d{2}\d{4}\d{5}\d{4} <-- will give you the 04 for the S: 04 value.  and so on using parenthesis around the value you need in separate tokens. And then combine the different separate values into one token with the "S:" "T:" and so on.

1 0

Replies

replied on December 17, 2015 Show version history

You can actually do this using token formatting in the Token Dialog. Using the pattern 

%(Number#"'S:' 00 'T:' 00 R: 00 'Sub:' 0000 'Blk:' 00000 'Lot:' 0000"#) we can return a token which looks like what you want. 

1 0
replied on December 17, 2015

Thanks. Im going to go with your first suggestion since I am filling a pdf form. I can create different text boxes for each entry.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.