Oracle中的regexp_substr文字最大长度限制
我需要提取文本中以分号分隔的值。 我使用 regexp_substr ,它非常强大,但字符串有限制。我有时有一个包含 10 000 个字符的文本,因此不可能在此 inbuild 函数中使用此类字符串。
文字看起来像这样 - AU783 343; 3N9493 ;113 UN9 WE3 54 ; OI8343,; 43U.783.3
只有 0-9 和 AZ ,如果有冒号或句点则应删除。输出必须保持原样,但没有前导和尾随空格,
AU783 343
3N9493
113 UN9 WE3 54
OI8343
43U7833
有什么建议如何避免最大长度限制?
I need to extract values delimited by semicolon in a text.
I use regexp_substr which is very powerful but the string has a limit. I have sometimes a text with 10 000 characters so is not possible to use such string in this inbuild function.
the text looks like this - AU783 343; 3N9493 ;113 UN9 WE3 54 ; OI8343, ; 43U.783.3
just 0-9 and A-Z , if there is a colon or period then it should be deleted. the output must be as it is but withou leading and trailing spaces
AU783 343
3N9493
113 UN9 WE3 54
OI8343
43U7833
any suggestion how to avoid the max length limit?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您不需要使用正则表达式。简单的字符串函数
SUBSTR
、INSTR
和REPLACE
就足够了,并且可以使用CLOB
值。例如,给定表:
您可以使用以下方法提取所有子字符串:
请参阅 db< >fiddle 是一个非常大的字符串的例子。
You don't need to use regular expressions. The simple string functions
SUBSTR
,INSTR
andREPLACE
are sufficient and work withCLOB
values.For example, given the table:
You can extract all the substrings using:
See db<>fiddle for an example with very large strings.