【发布时间】:2019-04-08 13:36:29
【问题描述】:
我需要在 Notepad++ 中从包体文件中提取对象名称(函数、过程等)和对象描述。
我知道这可以通过正则表达式实现,但有时 cmets 复合超过 3 行。
CREATE OR REPLACE PACKAGE BODY pac_example AS
/* *********************************************
* Function f1
* Description: Search for a data in table1
* (another comments)
* ******************************************* */
FUNCTION f1 RETURN NUMBER IS
BEGIN
SELECT * FROM table1;
RETURN 1;
END f1;
/* *********************************************
* Function f2
* Description: Search for a data in table2
* (another comments)
* (another comments)
* (another comments)
* ******************************************* */
FUNCTION f2 RETURN NUMBER IS
BEGIN
SELECT * FROM table2;
RETURN 1;
END f2;
END pac_example;
在这种情况下,我只需要替换文档中的所有内容并获得如下内容:
/* *********************************************
* Function f1
* Description: Search for a data in table1
* (another comments)
* ******************************************* */
FUNCTION f1 RETURN NUMBER IS
/* *********************************************
* Function f2
* Description: Search for a data in table2
* (another comments)
* (another comments)
* (another comments)
* ******************************************* */
FUNCTION f2 RETURN NUMBER IS
或者(最好的情况)这个:
FUNCTION f1 Search for a data in table1
FUNCTION f2 Search for a data in table2
【问题讨论】:
-
所以您不需要过程签名的详细信息(参数、返回类型)?