Link to home
Start Free TrialLog in
Avatar of pvsbandi
pvsbandiFlag for United States of America

asked on

Last Script not working

Hi,

 The previous script given to us in the below thread didn't work for the attached file.
https://www.experts-exchange.com/questions/28460484/split-pages-based-on-a-text-on-each-page.html?anchorAnswerId=40185645#a40185645

Can someone please help?
Report-02.txt
Avatar of Robert Schutt
Robert Schutt
Flag of Netherlands image

The file you have attached here does not contain CR/LF line endings, only LF (0x0A). Probably a different source, a unix system instead of a windows system.

You can change the pattern on line 10 to accommodate for any combination of CR/LF, for example:
oRE.Pattern = "(1SIDFA1PD(?:\s|\S)*?JURISDICTION NUMBER: (\d{2})(?:\s|\S)*?NUMBER OF ACTION LOGS CREATED:.*[\r\n]{1,2})"

Open in new window

Avatar of pvsbandi

ASKER

Hi Robert,

  Great solution! Two questions though..
1. How could you figure out the endings are different?
2. What exactly is the meaning of the change you made?

Thanks again!
ASKER CERTIFIED SOLUTION
Avatar of Robert Schutt
Robert Schutt
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks a lot!!