|
|
Rank: Administration
Joined: 2/13/2008 Posts: 6 Location: Idaho Falls, ID
|
Example 1: Extracts a date value from a multi-value string. ie. (B,W,1/12/2003, AD13447-TX) Considers double and single digit months and days, always expects 4 digit year.(single step process) Step 1: (\d\d\/\d\d\/\d\d\d\d)|(\d\d\/\d\/\d\d\d\d)|(\d\/\d\d\/\d\d\d\d)|(\d\/\d\/\d\d\d\d) - Find first
Example 2: get the Month from a date value and pad the single digit months with a zero ie. 8=08 etc.(4 step process)
step 1: (\d\/)|(\d\d\/) - Find First step 2: (\d\/)|(\d\d\/) - Replace First -0$1$2 step 3: (\d\d\/) - Find First step 4: \d\d - Find All
|
|
Rank: Administration
Joined: 2/13/2008 Posts: 6 Location: Idaho Falls, ID
|
With Version 2.1.045 release and support for Window Title bar capture, you might need to locate a specific item in the string. This regular expression example finds ID: and creates a token from the ID number.
(?:ID: )(d/d/d/d)
|
|
Rank: Newbie
Joined: 2/16/2009 Posts: 1 Location: Tallahassee, FL
|
Do ya'll have any advice for going about creating a folder structure for use in a Building department? Their current structure is organized by address, and is as follows:
Building Master Report -A's --Adams ---900 ----901 -----Doc1 -----Doc2 -----Doc3 -----Doc4
|
|
Rank: Administration
Joined: 2/13/2008 Posts: 6 Location: Idaho Falls, ID
|
For this example I'll assume that you can capture the data "Adams" and the data "901" using normal methods. You should create multiple tokens for each and apply regular expression to format the data as required. Token Name: Name_Folder; "Adams" becomes "Adams" no regular expression needed. Token Name: Alpha_Folder; "Adams" becomes "A" using the regular expression (User Defined) \D Find First. Token Name: Unit_Folder; "901" becomes "901" no regular expression needed. Token Name: Unit_Prefix_Folder; "901" becomes "90" using the regular expression (User defined) \d\d Find First.
Then the dynamic, Create sub-folder path becomes %(Alpha_Folder)\%(Name_Folder)\%(Unit_Prefix_Folder)0\%(Unit_Folder)
Although this may not be 100% correct depending on your situation, I hope it sheds some light on the techniques used to create tokens and the use of regular expression.
|
|
|
Guest |