王朝百科
分享
 
 
 

Match

王朝百科·作者佚名  2010-02-10  
宽屏版  字体: |||超大  

计算机语言Match()

功能确定字符串中是否包含指定模式的字符。

语法Match ( string, textpattern )

参数string:string类型,指定要检查是否匹配指定模式的字符串textpattern:string类型,指定文本匹配模式返回值Boolean:如果字符串string与模式textpattern相匹配,则函数返回TRUE,否则返回FALSE。如果指定的匹配模式无效或上述两个参数中的任何一个未曾赋值,那么Match()函数返回FALSE。如果任何参数的值为NULL,Match()函数返回NULL。

用法textpattern参数的写法与正则表达式十分相似,它由元字符和普通字符组成。每个元字符都有不同的匹配含义,普通字符则与其自身相匹配。下面是匹配模式中使用的元字符及其意义:

^指示字符串的开始,例如,^asd表示以asd开头的字符串,字符串asdfgh与模式^asd匹配,而字符串basdfg与模式^asd不匹配。

$指示字符串的结束,例如,red$表示所有以red结束的字符串均与该模式匹配,而redo与模式red$不匹配。

.匹配任意单个字符,例如,^&&$匹配任何六个字符组成的字符串。

[]匹配括号中列出的字符,例如,^[ABC]$匹配由一个字符组成的字符串,其值只能是A或B或C。

-与方括号一起,指定匹配字符的范围,例如,^[A-Z]$只匹配那些由一个大写字母组成的字符串。方括号里还可以使用^字符,表示匹配不在指定范围内的任何字符,例如,[^0-9]匹配除数字外的任何字符。

*,+,?这些符号跟在一个字符后面表示该字符可以出现的次数。星号(*)表示可以出现0次或任意次;加号(+)表示可以出现多次,但至少出现一次;问号(?)表示出现0次或一次。例如,A*匹配0个或多个A(没有A、A、AA、AAA、AAAA、**);A+匹配1个或多个A(A、AA、AAA、AAAA、**);A?匹配空串或1个A。

斜杠()是转义字符,它去掉特殊字符的特殊含义,比如,模式$匹配字符$,模式\匹配字符。

英文释义match美音:[mætʃ]英音:[mætʃ]

名词n. [C]1.比赛,竞赛。

2.对手,敌手;相配者。

3.婚姻。

4.火柴。

5.导火线,火绳。

不及物动词 vi.

1.相配,相适合。[(+up)]

2.结婚。

词形变化:

名词:matcher 动词过去式:matched 过去分词:matched 现在分词:matching 第三人称单数:matches

例句与用法:

1. Our team has won the football match.

我们队赢得了足球赛。

2. The hat and shoes are a perfect match.

这顶帽子和鞋子完全相配。

3. The curtains don't match the paint.

窗帘和油漆不相配。

4. She lit a cigar with a match.

她用一根火柴点燃了雪茄。

5. Match your skill against the experts in this quiz.

在这一测验中你与专家较量一下技巧吧。

6. He thought he could beat anyone at tennis, but he's met his match in her.

他以为他打网球所向无敌,但遇到她却是旗鼓相当。

7. I'm ready to match my strength against yours.

我已经准备好与你较量力气。

英英解释:

名词match:

1. lighter consisting of a thin piece of wood or cardboard tipped with combustible chemical; ignites with friction

同义词:lucifer, friction match

2. a formal contest in which two or more persons or teams compete

3. a burning piece of wood or cardboard

4. an exact duplicate

同义词:mate

5. the score needed to win a match

6. a person regarded as a good matrimonial prospect

同义词:catch

7. a person who is of equal standing with another in a group

同义词:peer, equal, compeer

8. a pair of people who live together

同义词:couple, mates

9. something that resembles or harmonizes with

动词match:

1. be compatible, similar or consistent; coincide in their characteristics

同义词:fit, correspond, check, jibe, gibe, tally, agree

2. provide funds complementary to

3. bring two objects, ideas, or people together

同义词:mate, couple, pair, twin

4. be equal to in quality or ability

同义词:equal, touch, rival

5. make correspond or harmonize

同义词:fit

6. satisfy or fulfill

同义词:meet, cope with

7. give or join in marriage

8. set into opposition or rivalry

同义词:pit, oppose, play off

9. be equal or harmonize

10. make equal, uniform, corresponding, or matching

同义词:equal, equalize, equalise, equate

 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
中国古代四大美女:背后隐藏惊人秘密
 女性   2025-06-20
如何用java替换看不见的字符比如零宽空格​十六进制U+200B
 干货   2023-09-10
网页字号不能单数吗,网页字体大小为什么一般都是偶数
 干货   2023-09-06
java.lang.ArrayIndexOutOfBoundsException: 4096
 干货   2023-09-06
Noto Sans CJK SC字体下载地址
 干货   2023-08-30
window.navigator和navigator的区别是什么?
 干货   2023-08-23
js获取referer、useragent、浏览器语言
 干货   2023-08-23
oscache遇到404时会不会缓存?
 干货   2023-08-23
linux下用rm -rf *删除大量文件太慢怎么解决?
 干货   2023-08-08
刀郎新歌破世界纪录!
 娱乐   2023-08-01
js实现放大缩小页面
 干货   2023-07-31
生成式人工智能服务管理暂行办法
 百态   2023-07-31
英语学习:过去完成时The Past Perfect Tense举例说明
 干货   2023-07-31
Mysql常用sql命令语句整理
 干货   2023-07-30
科学家复活了46000年前的虫子
 探索   2023-07-29
英语学习:过去进行时The Past Continuous Tense举例说明
 干货   2023-07-28
meta name="applicable-device"告知页面适合哪种终端设备:PC端、移动端还是自适应
 干货   2023-07-28
只用css如何实现打字机特效?
 百态   2023-07-15
css怎么实现上下滚动
 干货   2023-06-28
canvas怎么画一个三角形?
 干货   2023-06-28
canvas怎么画一个椭圆形?
 干货   2023-06-28
canvas怎么画一个圆形?
 干货   2023-06-28
canvas怎么画一个正方形?
 干货   2023-06-28
中国河南省郑州市金水区蜘蛛爬虫ip大全
 干货   2023-06-22
javascript简易动态时间代码
 干货   2023-06-20
 
>>返回首页<<
 
 
静静地坐在废墟上,四周的荒凉一望无际,忽然觉得,凄凉也很美
© 2005- 王朝网络 版权所有