mirror of
http://112.124.100.131/ebiz-ai/ebiz-base-ai.git
synced 2025-12-06 17:36:48 +08:00
feat: 更新正则位置
This commit is contained in:
@@ -92,14 +92,16 @@ export default {
|
||||
// 如果开头是中文,直接返回
|
||||
if (new RegExp('^[\u4e00-\u9fa5]+', 'g').test(text)) return text
|
||||
|
||||
text = text.replace(/<information>([^<]*)(?:<\/information>)?/g, '')
|
||||
text = text.replace(/<is_complete>([^<]*)(?:<\/is_complete>)?/g, '')
|
||||
|
||||
// 捕获 不包含 < 的后置标签 span> /span> a</span>
|
||||
text = text.replace(/^[/]?[a-zA-z0-9]+[</\w>]+/g, '')
|
||||
// 尝试匹配 </abc> 标签
|
||||
text = text.replace(/^<\w+>/g, '')
|
||||
// <\/?([\w\s]+)?(?!>)$
|
||||
text = text.replace(/<\/?([\w\s='"]+)?(?!>)$/g, '')
|
||||
text = text.replace(/<information>([^<]*)(?:<\/information>)?/g, '')
|
||||
text = text.replace(/<is_complete>([^<]*)(?:<\/is_complete>)?/g, '')
|
||||
|
||||
text = text.replace(/^\w+/, "")
|
||||
return text
|
||||
// }
|
||||
|
||||
Reference in New Issue
Block a user