英文:
Regexreplace $ in address
问题
我想要在几个单元格中去掉"$"符号。
一个单元格包含例如"$q$3",但我想将它改成"Q3"。
如何使用regexreplace函数解决这个问题?
有人能帮忙吗?谢谢!
英文:
I would like to get rid of "$" in several cells.
A cell contains f.e. "$q$3", but I would to change it into "Q3"
How to fix this with function regexreplace?
Anyone? Thanks for helping!
答案1
得分: 3
Here's the translated content:
这取决于您编写代码的语言,因此保罗·丹普西先生的备注是这样的。
这是一个处理C#中移除特殊字符的链接,这是microsoft.learn的一个链接:
using System.Text.RegularExpressions;
string input = "$q$3";
string pattern = "\$";
string replacement = "";
string result = Regex.Replace(input, pattern, replacement);
如果您在搜索引擎中输入正则表达式和工具,您将找到许多工具,这里有一个在线.NET编译器。
如果这个答案对您有帮助,请给保罗·丹普西先生的备注点个赞。谢谢。
如果有任何拼写错误、明显错误等,请您提出批评以改进答案。
英文:
Well it depends in what language your coding, hence the remark of Mr. Paul Dempsey.
Here's a link that deals with removing special characters with c#, and here's one from microsoft.learn:
using System.Text.RegularExpressions;
string input = "$q$3";
string pattern = "$";
string replacement = "";
string result = Regex.Replace(input, pattern, replacement);
if you type in regex and tools in a search engine you'll find plenty of tools and here's an on-line .Net compiler
If this answer helps you, plz give Mr. Dempsey's remark an upvote. Thank you.
Any typo's, obvious mistakes, ... . Plz be so kind to post a remark to improve the answer.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论