Wrote a script years ago.. and it finally broke.. help?

Get help with installation and running here.

Moderators: DataMystic Support, Moderators, DataMystic Support, Moderators, DataMystic Support, Moderators

Post Reply
rukiddin50
Posts: 2
Joined: Mon Aug 14, 2017 10:51 am

Wrote a script years ago.. and it finally broke.. help?

Post by rukiddin50 »

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
User avatar
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?

Post by DataMystic Support »

Try:

Code: Select all

^ \w{3}\d{2}\w{1}|^ TTL|OPEN RMA
This allows the first 3 characters to be letters or numbers, then insists on 2 digits, then allows one more letter or number
rukiddin50
Posts: 2
Joined: Mon Aug 14, 2017 10:51 am

Re: Wrote a script years ago.. and it finally broke.. help?

Post by rukiddin50 »

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.
User avatar
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?

Post by DataMystic Support »

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).
Arydigital
Posts: 1
Joined: Thu Sep 14, 2017 11:00 pm
Contact:

Re: Wrote a script years ago.. and it finally broke.. help?

Post by Arydigital »

This allows the first 3 characters to be letters or numbers, then insists on 2 digits,

Code: Select all

http://www.arydigital.tv/ary-digital-old-dramas/
then allows one more letter or number

Code: Select all

https://www.arydigital.tv/videos/category/noor-ul-ain/
Post Reply