如何从超高速接收的数据中删除奇怪的字符 [英] How Can I Remove Weird Characters From Data I Am Receiving From Hyperterminnal
问题描述
- JL206F
ID:VDE400
$
2015/05/27
10:28:20
?J?Batch_No。:
052
?J?运营商
ID:15
--------
---- ------------
--------
混合Counti
ng
?W?----------
---------------
-------存款
金额:
0.00
------
---------------
-----------
deno < br $>
m count
value
?
U ?? V ?? K? 2 10
0.00
?J ?? U ?? V ?? K
?0?D? 40.00
?J
?? U ?? V ?? K ??? D 2
20.00
?J?----
---------------
------------ -
到
tal:6
160.00
---- -----------
---------------
-
硬币:
0.00
----------
--- ------------
-------
余额:
0.00
-----
----------------
- ----------
这是我从超级终端收到的数据。我a = m使用C#代码,一旦我得到数据,我想用这些数据自动打开excel表。如何在ordder中删除这些奇怪的字符以获取正确的信息。
--JL206F
ID:VDE400
50
2015/05/27
10:28:20
JBatch_No.:
052
JOperator
ID:15
--------
----------------
--------
Mixed Counti
ng
W----------
---------------
-------Deposit
Amount:
0.00
------
---------------
-----------
deno
m count
value
UVK 2 10
0.00
JUVK
0D 40.00
J
UVK??D 2
20.00
J----
---------------
-------------
To
tal: 6
160.00
---------------
---------------
--
Coin:
0.00
----------
---------------
-------
Balance:
0.00
-----
----------------
-----------
This is the data I am receiving from my hyperterminal. I an=m using C# code and once I wil get the data i want to open excel sheet automatically with this data. How can I remove these weird characters in ordder to fetch right information.
推荐答案
您可以使用正则表达式并替换您需要的所有字符字符串
http://www.regxlib.com/ [ ^ ]
You can use regex and replace all the character that you need to from you string
http://www.regxlib.com/[^]
这篇关于如何从超高速接收的数据中删除奇怪的字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!