3分钟
字符集
字符集也叫做字符类。 方括号用来指定一个字符集。 在方括号中使用连字符来指定字符集的范围。 在方括号中的字符集不关心顺序。 例如,表达式[Tt]he 匹配 the 和 The。
"[Tt]he" => The car parked in the garage.方括号的句号就表示句号。 表达式 ar[.] 匹配 ar.字符串
"ar[.]" => A garage is a good place to park a car.字符集也叫做字符类。 方括号用来指定一个字符集。 在方括号中使用连字符来指定字符集的范围。 在方括号中的字符集不关心顺序。 例如,表达式[Tt]he 匹配 the 和 The。
"[Tt]he" => The car parked in the garage.方括号的句号就表示句号。 表达式 ar[.] 匹配 ar.字符串
"ar[.]" => A garage is a good place to park a car.Copyright © 2013-2025 Tencent Cloud.All Rights Reserved. 腾讯云 版权所有
学员评价