替换 String/txt 文件中的内容将暗淡的字符和数字添加为值
我正在尝试解决这个问题,但我无法让它发挥作用,我被困住了,请帮忙。
我有一个 .txt 文件,类似于以下
示例:
GA117.50.0117.50.0117.50.0IL16.08.08.00.016.00.0IN284.09.4274.60.0284.00.0KY137.60.0137.60.0 137.60.0TN170.30.0170.30.0170.30.0US725.417.4708.00.0725.40.0总计725.417.4708.00.0725.40.0
我在 classic-asp 中尝试做的是获取暗淡的字母/单词(并在字母/单词之前添加一个 str)和数字作为该暗淡的值,但仅限于第一个句点和另外一个句号后面的数字,然后继续下一个字母/单词。
所以最终的结果看起来像这样:
dim strGA
dim strIL
dim strIN
dim strKY
dim strTN
dim strUS
dim strTOTAL
strGA=117.5
strIL=16.0
strIN=284.0
strKY=137.6
strTN=170.3
strUS=725.4
strTOTAL=725.4
非常感谢您对这个问题的任何帮助。
I'm trying to figure this out and I just cannot get it to work, I'm stuck please help.
I have a .txt file that will look something like this
Example:
GA117.50.0117.50.0117.50.0IL16.08.08.00.016.00.0IN284.09.4274.60.0284.00.0KY137.60.0137.60.0137.60.0TN170.30.0170.30.0170.30.0US725.417.4708.00.0725.40.0TOTAL725.417.4708.00.0725.40.0
What I'm trying to do in classic-asp is to get the letters/word in a dim (and add a str before the letters/word) and the numbers as the value for that dim but only to the first period and 1 more number to the right after the period and then continue to the next letter/word.
so the final outcome would look something like this:
dim strGA
dim strIL
dim strIN
dim strKY
dim strTN
dim strUS
dim strTOTAL
strGA=117.5
strIL=16.0
strIN=284.0
strKY=137.6
strTN=170.3
strUS=725.4
strTOTAL=725.4
Thank you so much for any help with this problem/question.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
考虑以下示例。
可能需要根据变量名称更改模式。
Consider the following example.
May need to change the pattern according to the variable names.