Access to matched subexpressions through automation

Get help with installation and running here.

Moderators: DataMystic Support, Moderators

Posts: 1
Joined: Tue Mar 02, 2004 1:31 am

Access to matched subexpressions through automation

Postby Calvin » Tue Mar 02, 2004 7:02 am

:shock: I'm suprised that matched subexpressions are not exposed in Textpipe's automation. I have a simple task but have yet figured out how to do it without creating huge and slow arrays. i.e.
I have a graphic description file with thousands of entries such as:

"filename", "filedesc", <category>, 1-20-2004 T12:01:03

All I wanted to do was parse each line, create a folder with the category name , then create a subfolder with the filedesc as name, and finally move the file inside. It would be a piece of cake if the processline method passed an array of matched subexpressions (if any/applicable). :D
The only other 'easy' way would be if the entire filter sequence had the option of being executed (except for input and output) for each line of input instead of the entire thing.

User avatar
DataMystic Support
Site Admin
Posts: 2139
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia

Postby DataMystic Support » Fri Mar 05, 2004 7:54 am

You can use the 'Restrict to each line in turn' filter to handle the file one line at a time.

Another useful method might be to modify the pattern match so that it replaces the text in an easy-to-parse form for VBScript eg

"filename", "filedesc", <category>, 1-20-2004 T12:01:03

Then you can use VBScript's split function to split this into an array.

:lol: That should help!

Simon Carter, - Insulin dose calculator for Type 1 diabetes - 250,000 free software downloads - send huge email attachments

Return to “TextPipe Tips and Tricks, Questions and Support”

Who is online

Users browsing this forum: No registered users and 1 guest