匹配字符串而不是子字符串 [英] Match string not substring
问题描述
考虑一个字符串
DummyColumnVaEPSI_t_LoresSubCyl_T6 [x] _ [27] > (VaEPSI_t_LoresSubCyl_T6 [x] _ [16] + VaEPSI_t_LoresSubCyl_T6 [x] _ [27] )
现在,当我将 VaEPSI_t_LoresSubCyl_T6 [x] _ [27] 替换为'' VaEPSI_t_LoresSubCyl_T6 [x] _ [27] ''.
显示的输出是
DummyColumn''VaEPSI_t_LoresSubCyl_T6 [x] _ [27]''> (VaEPSI_t_LoresSubCyl_T6 [x] _ [16] + ''VaEPSI_t_LoresSubCyl_T6 [x] _ [27]'')
我只想要完全匹配的字符串作为
DummyColumnVaEPSI_t_LoresSubCyl_T6 [x] _ [27] > (VaEPSI_t_LoresSubCyl_T6 [x] _ [16] + ''VaEPSI_t_LoresSubCyl_T6 [x] _ [27]'')
请帮助
在匹配字符串之前和替换字符串中包含一个空格.
AAAABBB> (CCC + BBB)搜索"BBB"并将其替换为" BBB""
Consider a string
DummyColumnVaEPSI_t_LoresSubCyl_T6[x]_[27] > (VaEPSI_t_LoresSubCyl_T6[x]_[16] + VaEPSI_t_LoresSubCyl_T6[x]_[27])
Now when I replace VaEPSI_t_LoresSubCyl_T6[x]_[27] by ''VaEPSI_t_LoresSubCyl_T6[x]_[27]''.
output shown is
DummyColumn''VaEPSI_t_LoresSubCyl_T6[x]_[27]'' > (VaEPSI_t_LoresSubCyl_T6[x]_[16] + ''VaEPSI_t_LoresSubCyl_T6[x]_[27]'')
I want only exact string match as
DummyColumnVaEPSI_t_LoresSubCyl_T6[x]_[27] > (VaEPSI_t_LoresSubCyl_T6[x]_[16] + ''VaEPSI_t_LoresSubCyl_T6[x]_[27]'')
Plz help
So include a space before the match string, and in the replacement.
AAAABBB > (CCC + BBB)Search for " BBB" and replace it with " ''BBB''"
这篇关于匹配字符串而不是子字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!