Search and Replace 正则应用一例/脚本应用 之 导入 Babylon 源文件到 Access

标题: Search and Replace 正则应用一例/脚本应用 之 导入 Babylon 源文件到 Access

正文:

QUOTE:

作用: 
本正则脚本适用于 Babylon(一个词翻译软件) 所有术语源文件, 
功能为替换术语源文件格式为适合 Access 数据库软件导入格式(*.txt).
Access 数据库格式为: 标题(文本),副标题(文本),内容(备注)

使用工具含: Search and Replace && Access && UltraEdit
操作行数为 100万行 以内.

操作进程: 慢
注: 决不会比操作数据仓储慢就是, 起码不需要半小时以上.
//某操作未至1百万行数据, 大概需时 十分钟

操作分两大步骤:
1. SR 与文本文件操作
2. Access 导入操作

----------------------------------
2. Access 导入操作

字段分隔符 @
文本识别符 '
----------------------------------
1. SR 与文本文件操作

打开原文本文件, 在首行光标移至首位,然后回车
执行 SR 脚本 文件
执行完后打开文本文件 清除首末行

脚本名: babylon_glossary_replace.srs

脚本内容:

CODE:
 
shawl.qiu<shawl.qiuATgmail.com>
绿色学院 | http://blog.csdn.net/btbtd/
2006-6-26

[Script for Search and Replace]
[Options]
Search_subdir=0
Prompt_flag=0
Max Display Chars=4096
Show Progress Dialog=1
Count across files=0
Replace Processing=0
Process Binary Files=1
Output_File=
Show_Files=1
Backup Path=G:/My Documents/replace_backup/
Before Hit=<
After Hit=>
Max Reg Expr=32767
Write to Backup Dir=0
Unzip Dir=D:/DOCUME~1/Phoenix.GI/LOCALS~1/Temp/
Show Files Without Hits=0
Display Replace String=1
Display File Stats=1
Show File Date and Size=1
Reverse Filters=0
Min Size Filter=0
Max Size Filter=0
Min Date Filter=
Max Date Filter=
Skip Files Mask=0
Ignore Attributes=55
Keep file time stamp=0
One hit=0
Sort File Names=0
Sort Ascending=1
Append to output file=0
[Search /i]
@
[Replace]
&#64;
[Search /i]
'
[Replace]
&#39;
[Search /ix]
^/r/n*!(/|)
[Replace]
/r/n%2|unsubtitle
[Search /ix]
^/r/n*|*
[Replace]
/r/n@@@@@'%2'@'%3'@'
[Search /ix]
/r/n
[Replace]

[Search /ix]
@@@@@
[Replace]
'/r/n
[Search /i]
<BR>
[Replace]
<br/>
[End of Search and Replace Script]

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值