将文本从大文本框解析为命名文本框 [英] Parsing text from a large textbox into named textboxes

查看:87
本文介绍了将文本从大文本框解析为命名文本框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人能给我一个正确方法的样本解析带有mutilpe行

数据的文本框并将这些数据发送到命名文本框吗?



我不希望任何人做所有的工作......只是让我走的正确..



我有:



名称

地址

城市,州,邮政编码

电话



我想发送给:

txtName,txtAddress,txtCity,txtState,txtZipcode&txtPhone



如果有人让我开始,我想我可以搞清楚。

thx

Can someone give me a sample of the right way the parse a textbox with mutilpe lines of
data and send that data into named text boxes ?

I don''t want anyone to do all the work ... just get me going the right way ..

I have:

Name
Address
City, State, zipcode
Phone

I want to send it to:
txtName, txtAddress, txtCity, txtState, txtZipcode & txtPhone

If someone will get me started I think I can figure it out.
thx

推荐答案

信息存储在哪里多行文本框?

答案:在数组数组中: MSDN [ ^ ]



因此,如果您扫描数组中的每一行,您应该找到包含信息的4行 - 如果您不是问题变得更大,因为您必须弄清楚您拥有哪些行,并且这变得复杂。 br />


目前还够吗?
Where is the info stored in a multiline Textbox?
Answer: in the Lines array: MSDN[^]

So, if you scan through each line in the array, you should find 4 lines which contain information - if you don''t the problem gets larger, because you have to work out which lines you do have, and that gets complicated.

Is that enough for the moment?


不完全。



我有6件我需要分开,所以我可以将数据塞进

命名字段。使用数组似乎是更高级的方式,不会很简单地解析每一行寻找数据会更容易吗?



I没有经验,但因为每次在

大文本框中格式相同,即



名称

地址

城市,州ZipCode

电话



我试图弄清楚的是我应该循环通过

文本,我知道第1行和第2行是Name,Address,然后第3行
行必须要解析,然后查找逗号之间的任何内容。 />
逗号和数字是状态,最后一行是

总是手机。我的问题是我不知道如何开始解析

所以我可以一遍又一遍地测试结果,直到我做对了。



thx。
Not quite.

I have 6 pieces I need to seperate so I can jam the data into the
named fields. Using an array seems the more advanced way, wouldn''t
simple parsing of each line looking for the data be easier?

I have no experience but as the data is formatted the same everytime in the
large textbox i.e.

Name
Address
City, State ZipCode
Phone

What reading I have tried to figure out says I should loop thru the
text, I know the 1st and 2nd lines are Name, Address, then the 3rd
line has to be parsed looking for the comma and then anything between
the comma and the numbers is the state and finally the last line is
always the phone. My issue is I don''t know how to start the parsing
so I can test the results over and over until I get it right.

thx.


这篇关于将文本从大文本框解析为命名文本框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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