本文介绍了我如何删除字符串?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何删除 \ r \ n 以及仅@ media屏幕和width:632px){。enctainerClass {width:600px!important;} .hidden {display:inline-block!important;} .photo_display {float:left!important;} .centerContainer {width:490px!important;} .halfWidth {宽度:50%!重要;}}



\\\\\对于5522 Marbut Forest Way,Lithonia的新消息,仅限@media屏幕和(最小宽度:632px)\\\\ n {\\\\ n .containerClass \\ n {\\\\ n宽度:600px!important; \\\\ n}} \\ n .hidden\r \ n {\\\ :inline-block!important; \\\\ n}} \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ n} \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ n宽度:50%!重要; \\\\ n} \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\ n提交列表| \\\\ n查看信息| \\ n回答问题\\ n \\\\\\\\\\\\\\\\\\\\\\\\\\\\ r \\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\租赁,\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\在5522 Marbut Forest Way.\\ n列表。查看以下详细信息。\\\\\\\\\\\\\\\\来自:Mario \\ n \\\\\\\\\\\\\\\\\\\\\\\\\\电子邮件:jermariodors [email protected]* \\\\\\\\\\\\\\\ n电话:(901)618-3090 \\ n消息:我对此租赁感兴趣,并希望安排观看。如果可能,请告诉我。\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\请单击电子邮件客户端中的回复以回复新的租用者。\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\可能是匿名的,以保护我们用户的隐私。\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \ n \\ n \\\\ \\\\\\\\\\\ n您的商品详情:\\ n \\\\ n \\\\\\\\\\\\\\\\ \\ n \\ n \\\\\\\\\\\\\\\\\\\\ \\\ \ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ 5522 Marbut Forest Way,\\\\ Lithiron,GA \\ n \\ n $ 870美元/月。 r \ n 3 br, 2 ba\\ n单户住宅\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ r \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\ n \ n \ n \\\\\\\\\\\\\\\\\\\\\ \\\\ n此电子邮件已发送至[email protected].\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ 。| 535 Mission Street,Suite 700,San Francisco,CA 94105 \\\\\\\\\\\\\\\\\\\\\\\ r \\\\\\\\\\\\\\ n





我尝试过:



  string  body = item2.HTMLBody; 

body = regex.Replace(body, String .Empty);
string body2 = < html>< body> + body + < / body>< / html>;

Panel1.Controls.Add( new LiteralControl(body2));
解决方案



How do I remove the "\r" and "\n" also the "@media only screen and (min-width: 632px) { .containerClass { width : 600px !important; } .hidden { display: inline-block !important; } .photo_display { float: left !important; } .centerContainer { width: 490px !important; } .halfWidth { width: 50% !important; } }"

"\r\n\r\n    New message for 5522 Marbut Forest Way, Lithonia\r\n    \r\n        @media only screen and (min-width: 632px)\r\n        {\r\n            .containerClass\r\n            {\r\n              width : 600px !important;\r\n            }\r\n            .hidden\r\n            {\r\n              display: inline-block !important;\r\n            }\r\n            .photo_display\r\n            {\r\n              float: left !important;\r\n            }\r\n            .centerContainer\r\n            {\r\n              width: 490px !important;\r\n            }\r\n            .halfWidth {\r\n              width: 50% !important;\r\n            }\r\n        }\r\n    \r\n  \r\n  \r\n    \r\n\r\n  \r\n  \r\n    \r\n      \r\n  \r\n  \r\n    \r\n      \r\n          \r\n            \r\n            \r\n              \r\n              Submit Listings |\r\n              View Leads |\r\n              Answer Questions\r\n              \r\n            \r\n          \r\n      \r\n    \r\n  \r\n  \r\n  \r\n  \r\n  \r\n  \r\n\r\n    \r\n\r\n  \r\n  \r\n    \r\n      \r\n        \r\n          \r\n            \r\n              \r\n                \r\n                  \r\n                    Hi Leasing,\r\n                  \r\n                  \r\n                    A new renter is interested in your listing at 5522 Marbut Forest Way.\r\n                    Check out the details below.\r\n                  \r\n                \r\n              \r\n              \r\n                \r\n                \r\n                  \r\n                    \r\n                      From: Mario \r\n                    \r\n                  \r\n                  \r\n                    \r\n                      Email: [email protected]*\r\n                    \r\n                  \r\n                                      \r\n                      \r\n                        Phone: (901) 618-3090\r\n                      \r\n                    \r\n                                    \r\n                    \r\n                      Message: I am interested in this rental and would like to schedule a viewing. Please let me know when this would be possible.\r\n                    \r\n                  \r\n                  \r\n  \r\n    \r\n  \r\n\r\n                  \r\n                                    \r\n  \r\n    \r\n  \r\n\r\n                  \r\n                    Please click Reply in your e-mail client to reply to the new renter.\r\n                  \r\n                  \r\n                    \r\n                      \r\n                        * This email address may be anonymized to protect the privacy of our users.\r\n                      \r\n                    \r\n                  \r\n                \r\n                \r\n              \r\n              \r\n                \r\n                  \r\n                    \r\n                      \r\n                        \r\n                          Your listing details:\r\n                        \r\n                      \r\n                    \r\n                  \r\n                  \r\n                    \r\n                      \r\n                        \r\n                                                      \r\n                                                  \r\n                      \r\n                      \r\n                        \r\n                          \r\n                            5522 Marbut Forest Way,\r\n                            Lithonia, GA\r\n                          \r\n                          $870/mo.\r\n                          3 br, 2 ba\r\n                          Single-Family Home\r\n                                                  \r\n                      \r\n                    \r\n                  \r\n                \r\n              \r\n            \r\n          \r\n        \r\n      \r\n    \r\n  \r\n  \r\n\r\n    \r\n        \r\n\r\n  \r\n    \r\n      \r\n        \r\n                \r\n          \r\n            This email was sent to [email protected].\r\n          \r\n        \r\n                        \r\n          \r\n            Trulia, Inc. | 535 Mission Street, Suite 700, San Francisco, CA 94105\r\n          \r\n        \r\n      \r\n    \r\n  \r\n\r\n    \r\n  \r\n\r\n\r\n"



What I have tried:

string body = item2.HTMLBody;

body = regex.Replace(body, String.Empty);
string body2 = "<html><body>" + body + "</body></html>";

Panel1.Controls.Add(new LiteralControl(body2));
解决方案



这篇关于我如何删除字符串?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-28 01:10