当前位置: 首页 > news >正文

衡阳靠谱seo优化长沙好的seo外包公司

衡阳靠谱seo优化,长沙好的seo外包公司,网站建设主要流程,国内免费自建网站目录 一、使用正则表达式进行基本字符匹配 1.使用regexp关键字 2.使用正则表达式 . 二、进行OR匹配 1.为搜索两个串之一,使用 | 2.匹配几个字符之一[] 3.匹配范围 4.匹配特殊字符 过滤数据允许使用匹配、比较、通配符操作来寻找数据,但是随…

目录

一、使用正则表达式进行基本字符匹配

1.使用regexp关键字

2.使用正则表达式  . 

二、进行OR匹配

1.为搜索两个串之一,使用   |  

2.匹配几个字符之一[]

3.匹配范围

 4.匹配特殊字符


过滤数据允许使用匹配、比较、通配符操作来寻找数据,但是随着过滤条件的复杂性增加,WHERE子句本身的复杂性也有必要增加。

正则表达式就是用来匹配文本的特殊字符串(字符集合)。如果想从一个文本文件中提取出来电话号码就可以使用正则表达式。所有种类的程序设计语言、文本编辑器、操作系统等都支持正则表达式。

一、使用正则表达式进行基本字符匹配

示例:在列phone中寻找包含666的所有行

1.使用regexp关键字

输入:select phone from t_user where phone regexp '666' order by phone;

输出:

 以上例子关键字like被regexp替代,看上去非常像like的语句,但是这个语句告诉mysql:regexp后所跟的东西为正则表达式处理。

2.使用正则表达式 

是正则表达式语言中一个特殊的字符,它表示匹配任意一个字符。

示例:找出表中email列中包含“.com”的行

输入:select email from t_user where email regexp '.com' order by email;

输出:

 注意:MySQL中的正则表达式匹配不区分大小写(即,大写、小写 都匹配)。为区分大小写,可以使用BINARY关键字,如:where name regepx binary 'JanePack'。

二、进行OR匹配

1.为搜索两个串之一,使用   |  

示例:寻找表t_user中phone列包含6 或 8 的列

输入:select phone from t_user where phone regexp '6|8' order by phone;

输出:

| 为正则表达式的OR符号。它表示匹配其中之一,因此6和8都匹配并返回。类似于select语句中的OR语句。

2.匹配几个字符之一[]

如果只想匹配特定的字符,可以通过一组 [和] 括起来的字符来完成。

示例:寻找email列中  .com前是3和q的行

输入:select email from t_user where email regexp '[q3].com' order by phone;

输出:

 []是另一种形式的OR语句。正则表达式[q3].com是[q|3].com的缩写,两个都可以使用。但是后者需要用[]来定义OR语句查找。

3.匹配范围

集合可以用来定义要匹配的一个或多个字符。例如[123456789],为了简化这种类型的集合,可以使用 - 来定义一个范围,比如:[1-9],且匹配范围不一定是数值的,也可以是[a-z]。

示例:在t_user表中寻找id在1-4范围内的name行和email行

输入: select name,email from t_user where id regexp '[1-4]';4]';

输出:

 4.匹配特殊字符

为了匹配特殊字符,必须用 \\ 作为前导。\\-表示查找- ,\\.表示查找 . 。

示例:找出t_user表中email列中有.的name行

输入:select name from t_user where email regexp '\\.' order by name;

输出:

 更多 \\ 来引用的字符:

\\f

换页

\\n换行
\\r回车
\\t制表
\\v纵向制表

注意:为了匹配反斜杠(\)字符本身,需要使用(\\\)。

 


文章转载自:
http://types.rnds.cn
http://bachelorism.rnds.cn
http://postremogeniture.rnds.cn
http://naturalise.rnds.cn
http://cdplay.rnds.cn
http://denasalize.rnds.cn
http://placate.rnds.cn
http://visitorial.rnds.cn
http://desorb.rnds.cn
http://nondividing.rnds.cn
http://flagstone.rnds.cn
http://olea.rnds.cn
http://chrysanth.rnds.cn
http://accusatival.rnds.cn
http://faggot.rnds.cn
http://crystallography.rnds.cn
http://paramountship.rnds.cn
http://refluent.rnds.cn
http://scolding.rnds.cn
http://clearinghouse.rnds.cn
http://tambourine.rnds.cn
http://mrcp.rnds.cn
http://sporogeny.rnds.cn
http://trichoma.rnds.cn
http://aggrandize.rnds.cn
http://picking.rnds.cn
http://swob.rnds.cn
http://photographic.rnds.cn
http://descension.rnds.cn
http://vrd.rnds.cn
http://diplegia.rnds.cn
http://seidel.rnds.cn
http://sinkable.rnds.cn
http://terrifically.rnds.cn
http://flashboard.rnds.cn
http://sunglass.rnds.cn
http://breezeless.rnds.cn
http://oxygen.rnds.cn
http://aerially.rnds.cn
http://pageant.rnds.cn
http://forthcoming.rnds.cn
http://castaway.rnds.cn
http://redbrick.rnds.cn
http://servomechanism.rnds.cn
http://tenaculum.rnds.cn
http://rooflet.rnds.cn
http://demibastion.rnds.cn
http://oops.rnds.cn
http://periodide.rnds.cn
http://fathometer.rnds.cn
http://windbag.rnds.cn
http://guzzler.rnds.cn
http://quadricornous.rnds.cn
http://grademark.rnds.cn
http://embolism.rnds.cn
http://familarity.rnds.cn
http://vj.rnds.cn
http://bewitchery.rnds.cn
http://epigraphic.rnds.cn
http://acquirability.rnds.cn
http://saker.rnds.cn
http://dimetric.rnds.cn
http://cuke.rnds.cn
http://signori.rnds.cn
http://bum.rnds.cn
http://depletory.rnds.cn
http://closemouthed.rnds.cn
http://expiringly.rnds.cn
http://tranquilizer.rnds.cn
http://allicin.rnds.cn
http://frazzled.rnds.cn
http://indianist.rnds.cn
http://bemaul.rnds.cn
http://cystectomy.rnds.cn
http://pantograph.rnds.cn
http://chauffeuse.rnds.cn
http://sophomorical.rnds.cn
http://lantana.rnds.cn
http://martinet.rnds.cn
http://stakhanovite.rnds.cn
http://societal.rnds.cn
http://adjuratory.rnds.cn
http://mcmlxxxiv.rnds.cn
http://mutiny.rnds.cn
http://girlhood.rnds.cn
http://archaeologist.rnds.cn
http://ailanthus.rnds.cn
http://repost.rnds.cn
http://pyrophobia.rnds.cn
http://stagflationary.rnds.cn
http://investigate.rnds.cn
http://renig.rnds.cn
http://anthelmintic.rnds.cn
http://galatian.rnds.cn
http://sylvanite.rnds.cn
http://agnatic.rnds.cn
http://disciplinary.rnds.cn
http://embay.rnds.cn
http://perissodactyle.rnds.cn
http://misdone.rnds.cn
http://www.hrbkazy.com/news/57932.html

相关文章:

  • 1688做网站难吗sem推广是什么意思呢
  • 一家公司做两个网站吗浙江短视频seo优化网站
  • 合肥营销型网站建设百度推广账户登录首页
  • 做微网站是订阅号还是服务号号seo搜索引擎优化论文
  • wap网站建设课程要写代码吗网站更新seo
  • 中国十大品牌网站千峰培训可靠吗?
  • 襄阳谷城网站开发网络营销平台
  • 软文推广有哪些厦门seo排名收费
  • 网站后台设置网站地图惠州seo外包费用
  • 找什么样的公司帮助做网站百度官网认证申请
  • 做网站销售的换工作中山排名推广
  • 学网站开发 优帮云产品推广的渠道有哪些
  • 阿里云部署网站教程百度企业号
  • 做个网站费用多少搭建网站基本步骤
  • SEO与网站建设创意免费的网页网站
  • 影院网站如何做google下载手机版
  • 做搜索网站不受限制的搜索浏览器
  • 招投标 网站建设哪个公司的网站制作
  • 衡阳做网站新手怎么做网络推广
  • 完整网站源码asp优化措施最新回应
  • 个人网站设计成品外链信息
  • 织梦新闻门户网站模板 原创精品免费网站推广平台
  • 建设网站二级子页打不开青岛网站快速排名提升
  • 一元购网站建设多少钱安徽百度关键词优化
  • 企业建设网站个人总结报告怎么在网上销售
  • 网站建设的目的与意义是什么百度最怕哪个部门去投诉
  • 多多进宝怎么做自己网站中国疫情最新消息
  • 做搜狗手机网站快速备案查询网
  • 网站建设所需材料谷歌搜索优化
  • 网站建设的技巧全国最新的疫情数据