简体   繁体   English

使用 c# 在 MS Word 中用另一个词替换一个词

[英]Replacing a word with another word in MS Word using c#

I want to replace a date (26:12:2012) in my document with a word "date".我想用“日期”一词替换文档中的日期 (26:12:2012)。 I am using c# and doing a customization of MS Word.我正在使用 c# 并自定义 MS Word。

这应该可以解决问题:

Regex.Replace(source, "\d{2}:\d{2}:\d{4}", "Date");

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

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