本文介绍了idnumber条目,可在文本框上自动添加连字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试单独使用reg ex,但是它只能检查它是否遵循格式,并且我想通过自动添加连字符来寻求一种更好的方式来从用户那里获取输入.

我的reg前:\ b \ d {2}-\ d {9}-\ d {1}

任何2位数字-任何9位数字-任何1位数字

i have tried using reg ex alone but it can only check if it followed the format and I want a better way of getting input from user by automatically adding hyphen.

my reg ex: \b\d{2}-\d{9}-\d{1}

any 2digit-any 9digit-any 1digit number

推荐答案




这篇关于idnumber条目,可在文本框上自动添加连字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-02 07:13