删除转义序列字符 [英] Remove Escape sequence characters

查看:73
本文介绍了删除转义序列字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法在以下字符串中使用string.replace

我要删除所有转义序列字符最终的字符串,就像这样
以下条款书受发行人计划的最终条款的约束.此处使用且未另行定义的大写字母应具有最终条款中赋予的含义.如果此条款表与本条款和条件之间存在任何不一致的情况,最终条款,以最终条款为准.
如果此条款清单中的投资目标,产品说明,Notes经济学和情景分析之间存在差异,则应使用Notes经济学.

需要您的帮助.

字符串strinput = @"\ pard \ qj \ li187 \ ri153 \ sb40 \ sa120 \ widctlpar \ tqc \ tx5400 \ wrapdefault \ aspalpha \ aspnum \ faauto \ adjustright \ rin153 \ lin187 \ itap0 {\ fs18根据发行人的最终条款
\ rquote程序.} {\ fs18} {\ fs18在此使用的大写术语以及此处未作其他规定的术语,应具有最终术语中赋予它们的含义.如果出现任何不一致的情况
在本条款细则与最终条款之间具有约束力时,以最终条款为准.} {\ fs18
如果此条款清单中的投资目标,产品说明,票据经济学和情景分析之间存在差异,则应采用票据经济学.} {\ b \ fs18
;
strinput.Replace("\ pard",");
strinput.Replace("\ qj",");


请帮助我删除转义序列字符.

I am not able to user string.replace in following string

I want to remove all escape sequnce charater final string will be like this
"The following term sheet is subject to the Final Terms pursuant to the Issuer s programme.Capitalized terms used and not otherwise defined herein shall have the meanings given to them in the Final Terms. In the event of any inconsistency between this term sheet and the Final Terms, the Final Terms shall govern.
If there is any discrepancy in this term sheet between the Investment Objectives, Product Description, Notes Economics and the Scenario Analysis, the Notes Economics shall apply.

need your help.

string strinput = @"\pard \qj \li187\ri153\sb40\sa120\widctlpar\tqc\tx5400\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin153\lin187\itap0 {\fs18 The following term sheet is subject to the Final Terms pursuant to the Issuer
\rquote s programme.}{\fs18 }{\fs18 Capitalized terms used and not otherwise defined herein shall have the meanings given to them in the Final Terms. In the event of any inconsist
ency between this term sheet and the Final Terms, the Final Terms shall govern.}{\fs18
If there is any discrepancy in this term sheet between the Investment Objectives, Product Description, Notes Economics and the Scenario Analysis, the Notes Economics shall apply.}{\b\fs18
";
strinput.Replace("\pard","");
strinput.Replace("\qj","");


Please help me removing escape sequence character.

推荐答案

尝试strinput.Replace(@"\\", @"\");


这篇关于删除转义序列字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆