简体   繁体   English

正则/记事本++表达式

[英]regular/notepad++ expressions

Basically, I'm struggling with extracting data and importing into a new field. 基本上,我正在努力提取数据并将其导入新领域。 Can this be done: 可以这样做:

namewithprefix="PS4 | Call of Duty" namewithoutprefix=""

I want it to look like this 我希望它看起来像这样

namewithprefix="PS4 | Call of Duty" namewithoutprefix="Call of Duty" 

Both on the same line in the xml document 两者都在xml文档的同一行

Many thanks 非常感谢

Find: 找:

namewithprefix="(.+) \| (.+)" namewithoutprefix=""

Replace: 更换:

namewithprefix="$1 | $2" namewithoutprefix="$2"

.+ will find any number of 1 or more characters, and anything in () is captured as a variable. .+将查找任意数量的1个或多个字符,并且()任何内容都将捕获为变量。 The two variables are then used in the replace as $1 and $2 . 然后在替换中将这两个变量用作$1$2

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM