I wrote a script years ago to process a report generated by an old system. Recently the system changed their part number sequence and it seems to have broken the report.
Unfortunately, I barely learned how to use Textpipe, I got it to work for what I needed and never looked at it again. I also got some help at the time from these forums, so my understanding was never really complete.
Anyhow, my "Remove non-matching lines" string is
^ \w{2}\d{3}\w{1}|^ TTL|OPEN RMA
and my easy pattern is
[capture(0+ not cr or lf),cr,lf,capture(0+ not cr or lf),cr,lf,capture(0+ not cr or lf),cr,lf,]
The report starts each new item with a part number, in the past the part number would have been in the format of 9Z7927 or 963548 or RM8978 (note that the part number always ended in at least 4 numbers). Well recently they started throwing letters into the 3rd position, so the part number might look like C9Z434 or 99Z343. Anyhow, it's this third digit that is causing the script to no longer work. If I manually change the part number before running the process it works. Also, once it fails, it fails on all subsequent lines of the report.
I can post more detailed examples of the original files and what the output would look like, but thought someone might be able to quickly and simply answer the question from this description.
Any help would be appreciated..
Thank you
Mike
Wrote a script years ago.. and it finally broke.. help?
Moderators: DataMystic Support, Moderators, DataMystic Support, Moderators, DataMystic Support, Moderators
-
- Posts: 2
- Joined: Mon Aug 14, 2017 10:51 am
- DataMystic Support
- Site Admin
- Posts: 2227
- Joined: Mon Jun 30, 2003 12:32 pm
- Location: Melbourne, Australia
- Contact:
Re: Wrote a script years ago.. and it finally broke.. help?
Try:
This allows the first 3 characters to be letters or numbers, then insists on 2 digits, then allows one more letter or number
Code: Select all
^ \w{3}\d{2}\w{1}|^ TTL|OPEN RMA
-
- Posts: 2
- Joined: Mon Aug 14, 2017 10:51 am
Re: Wrote a script years ago.. and it finally broke.. help?
That was the first thing I tried, as it seemed that it would work, but for whatever reason the script reads and processes a bit, and then the output gets all whacked out.
- DataMystic Support
- Site Admin
- Posts: 2227
- Joined: Mon Jun 30, 2003 12:32 pm
- Location: Melbourne, Australia
- Contact:
Re: Wrote a script years ago.. and it finally broke.. help?
Sounds like it will require deeper investigation. We're happy to help, please see http://www.datamystic.com/buy/premium_support
(or you could try Upwork.com).
(or you could try Upwork.com).
-
- Posts: 1
- Joined: Thu Sep 14, 2017 11:00 pm
- Contact:
Re: Wrote a script years ago.. and it finally broke.. help?
This allows the first 3 characters to be letters or numbers, then insists on 2 digits, then allows one more letter or number
Code: Select all
http://www.arydigital.tv/ary-digital-old-dramas/
Code: Select all
https://www.arydigital.tv/videos/category/noor-ul-ain/