Author Topic: Needing to removing a leading zero from a PDF index  (Read 2690 times)

dstrong

  • Newbie
  • *
  • Posts: 8
    • View Profile
Needing to removing a leading zero from a PDF index
« on: May 02, 2016, 08:41:41 AM »
Hi all,

I'm using a PDF indexer to grab a store code from a report, which should be fairly straight-forward except the code is 5 characters in the report with a leading zero, and I only want to index the last 4 characters. The indexer won't let me choose just the 4, it only recognizes the whole chunk. I've tried using a mask of ####, but that grabs the first 4 characters. Using the character removal option under the Load Information tab won't work either, as I need the index to show as 0065 for example, not 65. What are my other options here? Thank you for any help.

Greg Ira

  • Full Member
  • ***
  • Posts: 240
    • View Profile
Re: Needing to removing a leading zero from a PDF index
« Reply #1 on: May 03, 2016, 05:24:49 AM »
Is there some trailing character after the 5 character store code you could use in the mask?  For example if you had 01234:  You could use MASK='####:' then use character removal to remove the colon.

dstrong

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Needing to removing a leading zero from a PDF index
« Reply #2 on: May 03, 2016, 06:57:14 AM »
Unfortunately the store number is the last thing on the line. I went ahead and tried it with '#### ' and removing trailing spaces, but it failed.

pmuir1@us.ibm.com

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Needing to removing a leading zero from a PDF index
« Reply #3 on: June 07, 2016, 08:57:04 AM »
If you are using V9.5 on MP, you can use a regular expression on the PDF indexer FIELD parameter.  See the documentation at http://www-01.ibm.com/support/docview.wss?rs=86&uid=swg27041745#docs under PDF Indexer, Using Regular Expressions.