英语中的标点符号

 .period 句号
,comma 逗号
:colon 冒号
;semicolon 分号
!exclamation 惊叹号
?question mark 问号
 ̄hyphen 连字符
'apostrophe 省略号;所有格符号
—dash 破折号
‘ ’single quotation marks 单引号
“ ”double quotation marks 双引号
( )parentheses 圆括号
[ ]square brackets 方括号
《 》French quotes 法文引号;书名号
...ellipsis 省略号
¨tandem colon 双点号
"ditto 同上
‖parallel 双线号
/virgule 斜线号
&ampersand = and
~swung dash 代字号
§section; division 分节号
→arrow 箭号;参见号
+plus 加号;正号
-minus 减号;负号
±plus or minus 正负号
×is multiplied by 乘号
÷is divided by 除号
=is equal to 等于号
≠is not equal to 不等于号
≡is equivalent to 恒等于号
≌is identical to 全等于号
≈is approximately equal to 约等于号
<is less than 小于号
>is more than 大于号
≮is not less than 不小于号
≯is not more than 不大于号
≤is less than or equal to 小于或等于号
≥is more than or equal to 大于或等于号
%per cent 百分之…
‰per mill 千分之…
∞infinity 无限大号
∝varies as 与…成比例
√(square) root 平方根
∵since; because 因为
∴hence 所以
∷equals, as (proportion) 等于,成比例
∠angle 角
⌒semicircle 半圆
⊙circle 圆
○circumference 圆周
πpi 圆周率
△triangle 三角形
⊥perpendicular to 垂直于
∪union of 并,合集
∩intersection of 交,通集
∫the integral of …的积分
∑(sigma) summation of 总和
°degree 度
′minute 分
″second 秒
#number …号
℃Celsius system 摄氏度
@at 单价
在Java中,可以通过正则表达式来移除字符串中的中英文标点符号。中英文标点符号包括常见的英文标点(如逗号、句号、问号等)以及中文全角标点(如中文逗号、句号等)。可以使用`String.replaceAll()`方法配合正则表达式进行替换操作。 以下是一个完整的示例代码: ```java public class RemovePunctuation { public static void main(String[] args) { String text = "Hello, 你好!This is a test string with punctuation: 。,、;"; // 使用正则表达式移除中英文标点符号 String cleanedText = text.replaceAll("[\\p{Punct}\\u3000-\\u303F]", ""); System.out.println("原始字符串: " + text); System.out.println("清理后字符串: " + cleanedText); } } ``` ### 说明: - `\\p{Punct}`:匹配所有英文标点符号。 - `\\u3000-\\u303F`:匹配常见的中文标点符号,包括全角逗号、句号、顿号、书名号等。 - `replaceAll()`:将匹配到的标点符号替换为空字符串,即删除它们。 通过这种方式,可以有效地去除字符串中的中英文标点符号[^2]。 --- ### 更多处理方式 如果需要更精细的控制,例如保留某些特定的标点(如句号或感叹号),可以在正则表达式中排除这些字符。例如: ```java // 保留句号和感叹号 String cleanedText = text.replaceAll("[\\p{Punct}&&[^.!]]", ""); ``` 这将移除所有标点符号,但保留英文的句号和感叹号。 --- ### 相关问题 1. 如何在Python中去除中英文标点符号? 2. Java中如何使用正则表达式处理字符串? 3. 如何保留特定标点符号的同时去除其他标点? 4. 中文全角标点符号的Unicode范围是什么? 5. 有哪些常用的Java字符串处理技巧?
评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值