Re: How to converting this data?
Posted: Thu Jul 31, 2008 7:48 am
Try this perl pattern:
\[(\w+)\]([^\]]*)\[/\1\]
Replace with
$2|
\[(\w+)\]([^\]]*)\[/\1\]
Replace with
$2|
Industrial strength data manipulation
http://www.datamystic.com/forums/
Code: Select all
TextPipe
Filter Title: D:\dokumenty\FILTRY\przyklad_luki.fll
Filter List
-----------
Filter options
| [ ] Log to file
| [X] Append to logfile
| Log filename: textpipe.log
| Threshold 500
|
|--Input from file(s)
| [ ] Confirm before processing each file
| [ ] Confirm before processing read/only files
| [ ] Delete input files after processing
| Process binary files
|
|--Comment...
| | TEST
| |
| +--Perl pattern [^============SIMPLE DATA BEGIN============(.*)============SIMPLE DATA END============] with [$1]
| | [ ] Match case
| | [ ] Whole words only
| | [ ] Case sensitive replace
| | [ ] Prompt on replace
| | [ ] Skip prompt if identical
| | [ ] First only
| | [ ] Extract matches
| | Maximum text buffer size 4096
| | [ ] Maximum match (greedy)
| | [ ] Allow comments
| | [X] '.' matches newline
| | [X] UTF-8 Support
| |
| +--Convert End of Lines - Auto to None
| [X] Remove bad EOL
|
|--Comment...
| | We fill the missing gaps (PSEUDO TAGS)
| |
| | [/END_PSEUDO_TAG]
| | (insert missing pseudo tag)
| | [BEGIN_PSEUDO_TAG]
| |
| +--Perl pattern [(\[/a\]\[something_c\]|\[/something_c\]\[e\])] with [||]
| [ ] Match case
| [ ] Whole words only
| [ ] Case sensitive replace
| [ ] Prompt on replace
| [ ] Skip prompt if identical
| [ ] First only
| [ ] Extract matches
| Maximum text buffer size 4096
| [ ] Maximum match (greedy)
| [ ] Allow comments
| [X] '.' matches newline
| [X] UTF-8 Support
|
|--Comment...
| | Clean TAGS
| |
| |--Perl pattern [\[(b|c|something_c|d|e|f|more_f|g)\]] with [|]
| | [ ] Match case
| | [ ] Whole words only
| | [ ] Case sensitive replace
| | [ ] Prompt on replace
| | [ ] Skip prompt if identical
| | [ ] First only
| | [ ] Extract matches
| | Maximum text buffer size 4096
| | [ ] Maximum match (greedy)
| | [ ] Allow comments
| | [X] '.' matches newline
| | [X] UTF-8 Support
| |
| |--Perl pattern [\[/\w+\]] with []
| | [ ] Match case
| | [ ] Whole words only
| | [ ] Case sensitive replace
| | [ ] Prompt on replace
| | [ ] Skip prompt if identical
| | [ ] First only
| | [ ] Extract matches
| | Maximum text buffer size 4096
| | [ ] Maximum match (greedy)
| | [ ] Allow comments
| | [X] '.' matches newline
| | [X] UTF-8 Support
| |
| +--Replace [[a]] with []
| [ ] Match case
| [ ] Whole words only
| [ ] Case sensitive replace
| [ ] Prompt on replace
| [ ] Skip prompt if identical
| [ ] First only
| [ ] Extract matches
|
+--Output to file(s)
[ ] Only update date on changed files
[X] Keep original file's date and time
[ ] Append mode
[ ] Change extension to: .txt
Backup mode
Files List
----------
Code: Select all
|--Perl pattern [\[(\w+)\]([^\]]*)\[/\1\]\r\n] with [$2|]
| [ ] Match case
| [ ] Whole words only
| [ ] Case sensitive replace
| [X] Prompt on replace
| [ ] Skip prompt if identical
| [ ] First only
| [ ] Extract matches
| Maximum text buffer size 4096
| [ ] Maximum match (greedy)
| [ ] Allow comments
| [X] '.' matches newline
| [ ] UTF-8 Support
Code: Select all
============SIMPLE DATA BEGIN============
[a]aaa[/a]
[something_c]ccc[/something_c]
[e]eee[/e]
[more_f]fff[/more_f]
[g]ggg[/g]
============SIMPLE DATA END============
Code: Select all
============SIMPLE DATA BEGIN============
aaa|ccc|eee|fff|ggg|============SIMPLE DATA END============
oh sorry... my mistake I did not explainDataMystic Support wrote: What do you mean by 'parameter "B" and "D"?' You didn't provide one.
Code: Select all
[
'[title]', capture(1+ chars), '[/title]', 0+ chars,
longest optional( '[alternative_title]', capture(1+ chars), '[/alternative_title]', 0+ chars, )
'[director]', capture(1+ chars), '[/director]'
]