地址验证 [英] address validation

查看:97
本文介绍了地址验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我正在创建一个应用程序,需要清理地址字段上的数据。问题在于地址2。领域。问题在于:该字段中的数据可能类似于cas101。我想保留101。并清除任何以cas开头或结尾的单词并保持101。我将感谢您的暗示和建议。谢谢

解决方案

欢迎来到TSDN!


您可以使用替换功能:

展开 | 选择 | < span class =codeLinkonclick =WordWrap(this);> Wrap | 行号


非常感谢您的回复。但它会清理cas。只要。如果不是cas而不是cas有人把casa它会清理cas和a还在那里。我希望它用cas清除以cas开头或结尾的整个单词。任何想法?


在这种情况下,您可以将REReplace或REReplaceNoCase与正则表达式一起使用。 [a-z]会匹配任何一封信。如果您需要reg的帮助,请告诉我。进出口。

Hi all,

I''m creating an application that cleaning of the data on the address fields is required. The problem is in "Address 2" fields. Here is the problem: the data in this field could be like "cas101" I want to keep the "101" and clean any words that start or ends with "cas" and keep the "101". I''ll appreciate your hint and suggestion. Thanks

解决方案

Welcome to TSDN!

You could use the replace function:

Expand|Select|Wrap|Line Numbers


Thank you so much to reply. But it will clean the "cas" only. If instead of "cas" someone put "casa" it will clean "cas" and "a" is still there. I want it to clean the whole word starting or ending with "cas". Any Idea?


In that case, you can use REReplace or REReplaceNoCase with regular expressions. [a-z] would match any letter. Let me know if you need help with the reg. exp.


这篇关于地址验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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