当前位置:   article > 正文

freemaker 替换字符_freemarker 替换字符串

freemarker 替换字符串
  1. 替换字符串 replace  
  2. ${s?replace(‘ba’, ‘XY’ )}  
  3. ${s?replace(‘ba’, ‘XY’ , ‘规则参数’)}将s里的所有的ba替换成xy 规则参数包含: i r m s c f 具体含义如下:  
  4. · i: 大小写不区分.  
  5. · f: 只替换第一个出现被替换字符串的字符串  
  6. · r:  XY是正则表达式  
  7. · m: Multi-line mode for regular expressions. In multi-line mode the expressions ^ and $ match just after or just before, respectively, a line terminator or the end of the string. By default these expressions only match at the beginning and the end of the entire string.  
  8. · s: Enables dotall mode for regular expressions (same as Perl singe-line mode). In dotall mode, the expression . matches any character, including a line terminator. By default this expression does not match line terminators.  
  9. · c: Permits whitespace and comments in regular expressions. 
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小小林熬夜学编程/article/detail/212301
推荐阅读
相关标签
  

闽ICP备14008679号