【发布时间】:2020-07-17 04:14:59
【问题描述】:
如何对特定匹配中不存在的点符号执行正则表达式替换(例如在图像 HTML 标记中)
str = "Hi. the symbol before me is my match target <img src='http://skip.these.dots/and.this.as.well' alt='me.three' /> but still match this."
被替换为(例如)*符号
res = "Hi* the symbol before me is my match target <img src='http://skip.these.dots/and.this.as.well' alt='me.three' /> but still match this*"
【问题讨论】:
标签: regex regex-group regexp-replace