我有一个文本文件(没有标点符号),文件大小约为 100MB - 1GB,这是一些示例行:
please check in here
i have a full hd movie
see you again bye bye
press ctrl c to copy text to clipboard
i need your help
...
Run Code Online (Sandbox Code Playgroud)
并带有替换令牌列表,如下所示:
check in -> check_in
full hd -> full_hd
bye bye -> bye_bye
ctrl c -> ctrl_c
...
Run Code Online (Sandbox Code Playgroud)
替换文本文件后我想要的输出如下:
please check_in here
i have a full_hd movie
see you again bye_bye
press ctrl_c to copy text to clipboard
i need your help
...
Run Code Online (Sandbox Code Playgroud)
please check in here …Run Code Online (Sandbox Code Playgroud) 如何使用Java中的正则表达式删除句子中两个或多个连续数字之间的空格?
例如,
输入字符串:
Chan dung Mohamed Hilal, ch? 是吗??i?n tho?i 0164 345 6164 có giá 2,2 tri?u 美元。
期望输出:
Chan dung Mohamed Hilal, ch? 是吗??i?n tho?i 01643456164 có giá 2,2 tri?u 美元。