Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/qt/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Regex 记事本正则表达式替换_Regex_Notepad++ - Fatal编程技术网

Regex 记事本正则表达式替换

Regex 记事本正则表达式替换,regex,notepad++,Regex,Notepad++,基本上我有一套名字,比如 name1, name2, name3, 我想通过记事本中的查找和替换来完成++ name1 = name1, name2 = name2, name3 = name3, 在查找内容: [^\s,]+ 但是在替换为,我应该怎么做才能将“,”替换为“=找到的任何东西”,“ 谢谢找到什么(假设你的正则表达式正确地找到了你想要的):[^\s,]+ 替换为:$0=$0 $0表示与“Find what”中的表达式匹配的所有内容Find what(假设您的正则表达式正确地找到

基本上我有一套名字,比如

name1,
name2,
name3,
我想通过记事本中的查找和替换来完成++

name1 = name1,
name2 = name2,
name3 = name3,
查找内容:

[^\s,]+
但是在替换为,我应该怎么做才能将“,”替换为“=找到的任何东西”,“

谢谢找到什么(假设你的正则表达式正确地找到了你想要的):
[^\s,]+

替换为:
$0=$0

$0
表示与“Find what”中的表达式匹配的所有内容Find what(假设您的正则表达式正确地找到了所需内容):
[^\s,]+

替换为:
$0=$0


$0
表示“查找内容”中表达式匹配的所有内容您可以尝试在搜索字段中使用以下正则表达式:

^(\w+\d)

以及替换字段:

$1=$1


希望它能帮助你

您可以尝试在搜索字段上使用以下正则表达式:

^(\w+\d)

以及替换字段:

$1=$1


希望它能帮助你

另一篇文章也可以使用额外的群组捕获()。([^\s,]+)Lol man在我投票之前删除了另一篇文章太快了!NHAHDH,是$0记事本++特定的正则表达式吗?而捕获一个不是吗?@Gob00st:
$0
在Java、PCRE(记事本++使用的)中工作。但是,在JavaScript中不是这样的,
$&
是等效的。其他语言不确定。另一篇文章也可以使用额外的组捕获()。([^\s,]+)Lol man在我投票之前删除了另一篇文章太快了!NHAHDH,是$0记事本++特定的正则表达式吗?而捕获一个不是吗?@Gob00st:
$0
在Java、PCRE(记事本++使用的)中工作。但是,在JavaScript中不是这样的,
$&
是等效的。其他语言不一定。