Php 数学字母数字符号的正则表达式

Php 数学字母数字符号的正则表达式,php,regex,pcre,symbolic-math,Php,Regex,Pcre,Symbolic Math,我一直在尝试删除以下粗体字符: Initially, I thought this would be an uppercase/lowercase problem. You can likely follow the same with proper unicodes that you might want to find out. One problem with your expressions might be that + might be missing. My gu

我一直在尝试删除以下粗体字符:

Initially, I thought this would be an uppercase/lowercase problem. You can likely follow the same with proper unicodes that you might want to find out. 

One problem with your expressions might be that
+
might be missing.


My guess is that maybe this expression might work:

([\x{0041}-\x{005A}]+)

起初,我认为这将是一个大小写问题。您可能也可以使用您可能想要了解的适当的Unicode

表达式的一个问题可能是缺少
+


我的猜测是,这个表达式可能会起作用:

([\x{0041}-\x{005A}]{2,})
如果所有内容都可能是大写,或者可能是类似于:

$re = '/([\x{0041}-\x{005A}]+)/u';
$str = 'SONYA';
$subst = '\\L$1';

$result = preg_replace($re, $subst, $str);
echo $result;
如果我们只想替换索尼娅而不是索尼娅

如果您可能感兴趣的话,这里将对表达式进行解释

试验 参考文献

这些字符属于Unicode
数学
代码块

\p{Block=数学字母数字符号}
涵盖范围
[\x{1D400}-\x{1D7FF}]

这些字符混合了粗体、斜体粗体、脚本、脚本斜体、脚本斜体粗体等字体代码

如果您想花时间匹配每种类型和范围,可以将它们映射为ASCII等效项

我只想删除它们

以下是块范围内的字符(高度缩写)


1D400此
此正则表达式不要删除或替换粗体字符,请记住:正确的单词是这就像删除粗体字符的符咒一样有效,谢谢。