A part of a COA I have gets the page title. What I would like to do is replace the space between the last two words with a
But adding the stdWrap.replacement part results in no output at all:
stdWrap.cObject = COA
stdWrap.cObject {
10 = TEXT
10.field = title
10.htmlSpecialChars = 1
10.wrap = <h2>|</h2>
10.stdWrap.replacement {
10 {
search = \s(\S+)$
replace = \1
useRegExp = 1
}
}
}
答案 0 :(得分:2)
10 {
search = #(a )CAT#i
replace = \1cat
useRegExp = 1
}
#
中的#(a )CAT#i
为regex delimiters。所以,你需要的只是提供任何,比如说:
search = /\s(\S+)$/