如何在其末尾用cross(x)按钮创建EditText?(How to create EditText with cross(x) button at end of it?)
有没有像
EditText
这样的小部件,其中包含一个十字按钮,还是有自动创建的EditText
的任何属性? 我想要十字交叉按钮删除在EditText
写的任何文本。Is there any widget like
EditText
which contains a cross button, or is there any property forEditText
by which it is created automatically? I want the cross button to delete whatever text written inEditText
.
原文:https://stackoverflow.com/questions/6355096
满意答案
这些正则表达式是等效的(为了匹配目的):
/^(7|8|9)\d{9}$/
/^[789]\d{9}$/
/^[7-9]\d{9}$/
说明:
(a|b|c)
是正则表达式“OR”,意思是“a或b或c”,尽管OR所需的括号的存在也捕获数字。 要严格等效,您将编码(?:7|8|9)
使其成为非捕获组。
[abc]
是一个“字符类”,意思是“来自a,b或c的任何字符”(字符类可以使用范围,例如[ad]
=[abcd]
)这些正则表达式相似的原因是字符类是“或”(但仅适用于单个字符)的缩写。 在一个替代中,你也可以做一些像
(abc|def)
这样的东西,它不会转换成一个字符类。These regexes are equivalent (for matching purposes):
/^(7|8|9)\d{9}$/
/^[789]\d{9}$/
/^[7-9]\d{9}$/
The explanation:
(a|b|c)
is a regex "OR" and means "a or b or c", although the presence of brackets, necessary for the OR, also captures the digit. To be strictly equivalent, you would code(?:7|8|9)
to make it a non capturing group.
[abc]
is a "character class" that means "any character from a,b or c" (a character class may use ranges, e.g.[a-d]
=[abcd]
)The reason these regexes are similar is that a character class is a shorthand for an "or" (but only for single characters). In an alternation, you can also do something like
(abc|def)
which does not translate to a character class.
相关问答
更多正则表达式提取方括号之间的文本(Regular expression to extract text between square brackets)
正则表达式中方括号和括号之间有什么区别?(What is the difference between square brackets and parentheses in a regex?)
正则表达式在括号和方括号之间获取ip(Regex get ip between bracket and square bracket)
正则表达式从正方括号中提取?(Regex to extract from square brackets?)
如何在Emacs中创建正则表达式来捕获双方括号之间的文本?(How do I create a regex in Emacs to capture text between double square brackets?)
python正则表达式不检测方括号(python regex not detecting square brackets)
如何使用正则表达式删除括号/括号之间的所有非数字字符?(How to remove all non numeric characters between brackets/parentheses with a regex?)
正则表达式匹配不在方括号内的括号(Regex match parenthesis that are not within square braces)
正则表达式匹配方括号后跟括号,其中方括号也可以包含其他方括号(Regex matching square brackets followed by parenthesis where the square brackets can also contain other square brackets)
使用正则表达式查找方括号之间的值[重复](Using regex to find value between square brackets [duplicate])
相关文章
更多Create a Bootable MicroSD Card
Android EditText软键盘显示隐藏以及“监听”
His New Line Of High-End Gucci Handbags Gets Many Things Right On Its Inaugural Outing
Hadoop源码分析HDFS ClientProtocol——create
merge solr index &&&&& very import create new core
启动Solr服务报错:Path must not end with / character
基于Lucene 4.x的ik-analyzer
《X战警3:最后之战》(X-Men The Last Stand)[TC]
微信公众号接口添加菜单时错误(errcode":40017 invalid button type)
《wordpress插件制作视频教程》(How to create a wordpress plugin)全5集更新完毕[HDTV]
最新问答
更多sp_updatestats是否导致SQL Server 2005中无法访问表?(Does sp_updatestats cause tables to be inaccessible in SQL Server 2005?)
如何创建一个可以与持续运行的服务交互的CLI,类似于MySQL的shell?(How to create a CLI that can interact with a continuously running service, similar to MySQL's shell?)
AESGCM解密失败的MAC(AESGCM decryption failing with MAC)
Zurb Foundation 4 - 嵌套网格对齐问题(Zurb Foundation 4 - Nested grid alignment issues)
湖北京山哪里有修平板计算机的
SimplePie问题(SimplePie Problem)
在不同的任务中,我们可以同时使用多少“上下文”?(How many 'context' we can use at a time simultaneously in different tasks?)
HTML / Javascript:从子目录启用文件夹访问(HTML/Javascript: Enabling folder access from a subdirectory)
为什么我会收到链接错误?(Why do I get a linker error?)
如何正确定义析构函数(How to properly define destructor)
Copyright ©2023 peixunduo.com All Rights Reserved.粤ICP备14003112号
本站部分内容来源于互联网,仅供学习和参考使用,请莫用于商业用途。如有侵犯你的版权,请联系我们(neng862121861#163.com),本站将尽快处理。谢谢合作!