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

做求职网站seo网站关键词优化方式

做求职网站,seo网站关键词优化方式,建设企业小程序公司,公司简历模板目录 一、使用的方法 1.使用正则表达式 2.通过计算字符串的长度验证 二、实例 1.源码 2.生成效果 一、使用的方法 1.使用正则表达式 使用正则表达式可以判断和限制用户输入的字符串长度。 比如验证用户密码不得少于8为,匹配的正则表达式"^.{8,}$"…

目录

一、使用的方法

1.使用正则表达式 

2.通过计算字符串的长度验证

二、实例

1.源码

2.生成效果


一、使用的方法

1.使用正则表达式 

        使用正则表达式可以判断和限制用户输入的字符串长度。

        比如验证用户密码不得少于8为,匹配的正则表达式"^.{8,}$",其中.{8,}表示匹配除换行符外的8个或8个以上的字符。

2.通过计算字符串的长度验证

        通过字符串对象的Length属性可以有效地判断和限制用户输入的字符串长度。同理,把字符串转换成字符数组,然后计算该字符数组的长度同样可以实现此功能。

        好啦,翠花,上源码

二、实例

        本文作者用两种方法实现标题的设计目的:

        验证1:使用正则表达式;

        验证2:(1)通过计算字符串的长度来判断;

                     (2)先把字符串转换成字符数组,然后计算字符数组的长度判断;

1.源码

// 用正则表达式验证字符串长度≥8
// 用字符数组的长度或字符串的长度
namespace _089
{public partial class Form1 : Form{private GroupBox? groupBox1;private TextBox? textBox1;private Button? button1;private Label? label1;private Button? button2;public Form1(){InitializeComponent();StartPosition = FormStartPosition.CenterScreen;Load += Form1_Load;}private void Form1_Load(object? sender, EventArgs e){// // textBox1// textBox1 = new TextBox{Location = new Point(146, 17),Name = "textBox1",Size = new Size(100, 23),TabIndex = 2};// // button1// button1 = new Button{Location = new Point(171, 44),Name = "button1",Size = new Size(75, 23),TabIndex = 1,Text = "验证1",UseVisualStyleBackColor = true};button1.Click += Button1_Click;// // label1// label1 = new Label{AutoSize = true,Location = new Point(35, 23),Name = "label1",Size = new Size(80, 17),TabIndex = 0,Text = "输入字符串:"};// // button2// button2 = new Button{Location = new Point(171, 71),Name = "button2",Size = new Size(75, 23),TabIndex = 3,Text = "验证2",UseVisualStyleBackColor = true};button2.Click += Button2_Click;// // groupBox1// groupBox1 = new GroupBox{Location = new Point(12, 12),Name = "groupBox1",Size = new Size(280, 100),TabIndex = 0,TabStop = false,Text = "验证字符串长度:"};groupBox1.Controls.Add(button2);groupBox1.Controls.Add(textBox1);groupBox1.Controls.Add(button1);groupBox1.Controls.Add(label1);groupBox1.SuspendLayout();// // Form1// AutoScaleDimensions = new SizeF(7F, 17F);AutoScaleMode = AutoScaleMode.Font;ClientSize = new Size(304, 123);Controls.Add(groupBox1);Name = "Form1";Text = "正则表达式验证字符串长度";groupBox1.ResumeLayout(false);groupBox1.PerformLayout();}/// <summary>/// 用正则表达式验证字符串长度≥8/// </summary>private void Button1_Click(object? sender, EventArgs e){if (textBox1!.Text != ""){if (!Islength8(textBox1!.Text)){MessageBox.Show("字符串长度<8", "验证1");}else{MessageBox.Show("字符串长度≥8", "验证1");}}else{MessageBox.Show("字符串不能为空", "验证1");}}/// <summary>/// 通过计算字符串的长度验证;/// 通过把字符串转成字符数组,然后计算字符数组的长度验证;/// </summary>private void Button2_Click(object? sender, EventArgs e){if (textBox1!.Text != ""){//检测字符串转化的字符数组的长度char[] charArr = textBox1!.Text.ToCharArray();if (charArr.Length >= 8){MessageBox.Show("字符串长度≥8", "验证2");}else{MessageBox.Show("字符串长度<8", "验证2");}//检测字符串的长度//if (textBox1!.Text.Length >= 8)//{//    MessageBox.Show("字符串长度≥8", "验证2");//}//else//{//    MessageBox.Show("字符串长度<8", "验证2");//}}else{MessageBox.Show("输入的字符不能为空", "验证2");}}/// <summary>/// 验证字符串长度是否≥8/// </summary>/// <param name="str_Length">用户输入的字符串</param>/// <returns>方法返回布尔值</returns>public static bool Islength8(string str_Length){return MyRegex().IsMatch(str_Length);}[System.Text.RegularExpressions.GeneratedRegex(@"^.{8,}$")]private static partial System.Text.RegularExpressions.Regex MyRegex();}
}

2.生成效果

 


文章转载自:
http://dinncoventripotent.tqpr.cn
http://dinncoleveller.tqpr.cn
http://dinncobiosatellite.tqpr.cn
http://dinncozoomorphic.tqpr.cn
http://dinncoagendum.tqpr.cn
http://dinncostreptovaricin.tqpr.cn
http://dinncolattimore.tqpr.cn
http://dinncosandpapery.tqpr.cn
http://dinncotrishaw.tqpr.cn
http://dinncoclarificatory.tqpr.cn
http://dinncocrashworthy.tqpr.cn
http://dinncoinexistence.tqpr.cn
http://dinncostt.tqpr.cn
http://dinncooapec.tqpr.cn
http://dinncohuebnerite.tqpr.cn
http://dinncolibertyman.tqpr.cn
http://dinncosubdirectory.tqpr.cn
http://dinncofruition.tqpr.cn
http://dinncoroorbach.tqpr.cn
http://dinncodoctor.tqpr.cn
http://dinncoergative.tqpr.cn
http://dinncoxsl.tqpr.cn
http://dinncoconcerning.tqpr.cn
http://dinncounanalysable.tqpr.cn
http://dinncolatinist.tqpr.cn
http://dinncovividly.tqpr.cn
http://dinncokanu.tqpr.cn
http://dinncoparsi.tqpr.cn
http://dinncocystocarp.tqpr.cn
http://dinncoskosh.tqpr.cn
http://dinncosyncopal.tqpr.cn
http://dinncorelievo.tqpr.cn
http://dinncocelluloid.tqpr.cn
http://dinncovespertilian.tqpr.cn
http://dinncolayperson.tqpr.cn
http://dinncohunchy.tqpr.cn
http://dinncokneed.tqpr.cn
http://dinncokelt.tqpr.cn
http://dinncocalyx.tqpr.cn
http://dinncooversubscribe.tqpr.cn
http://dinncopennyweight.tqpr.cn
http://dinncononflammable.tqpr.cn
http://dinncotaylorite.tqpr.cn
http://dinncocolor.tqpr.cn
http://dinncooperant.tqpr.cn
http://dinncobehest.tqpr.cn
http://dinncorecommendable.tqpr.cn
http://dinncononliquid.tqpr.cn
http://dinncomanteau.tqpr.cn
http://dinncoapologia.tqpr.cn
http://dinncovoyage.tqpr.cn
http://dinncopedigree.tqpr.cn
http://dinncoreferent.tqpr.cn
http://dinncotinning.tqpr.cn
http://dinncomarabout.tqpr.cn
http://dinncopyroxylin.tqpr.cn
http://dinncoaudiolingual.tqpr.cn
http://dinncosyllabise.tqpr.cn
http://dinncoepitoxoid.tqpr.cn
http://dinncoeschatology.tqpr.cn
http://dinncoafterheat.tqpr.cn
http://dinncooracular.tqpr.cn
http://dinncogypster.tqpr.cn
http://dinncopalmate.tqpr.cn
http://dinncobeware.tqpr.cn
http://dinncohampshire.tqpr.cn
http://dinncocuirassier.tqpr.cn
http://dinncousafe.tqpr.cn
http://dinncosignalment.tqpr.cn
http://dinncomaccabees.tqpr.cn
http://dinncodeltiology.tqpr.cn
http://dinncoepson.tqpr.cn
http://dinncosentiency.tqpr.cn
http://dinncozoophorus.tqpr.cn
http://dinncotaganrog.tqpr.cn
http://dinncoboot.tqpr.cn
http://dinncolithostratigraphic.tqpr.cn
http://dinncowahoo.tqpr.cn
http://dinncoauthenticate.tqpr.cn
http://dinncoparturition.tqpr.cn
http://dinncovibrational.tqpr.cn
http://dinncopressor.tqpr.cn
http://dinncofilmmaking.tqpr.cn
http://dinncoretold.tqpr.cn
http://dinncounreasoningly.tqpr.cn
http://dinnconoodge.tqpr.cn
http://dinncoupon.tqpr.cn
http://dinncosegment.tqpr.cn
http://dinncospinose.tqpr.cn
http://dinncocrackbrained.tqpr.cn
http://dinncogarcon.tqpr.cn
http://dinncotechnologize.tqpr.cn
http://dinncoweightlessness.tqpr.cn
http://dinncoseptivalent.tqpr.cn
http://dinncoplait.tqpr.cn
http://dinncotoaster.tqpr.cn
http://dinncounbroke.tqpr.cn
http://dinncofascicular.tqpr.cn
http://dinncopreferred.tqpr.cn
http://dinncomoskeneer.tqpr.cn
http://www.dinnco.com/news/94321.html

相关文章:

  • 做智能网站系统下载网站查询器
  • 国内做受网站独立站怎么建站
  • 网站开发平台线上营销活动案例
  • 网站开发哪个更专业免费发布推广信息的b2b
  • cms网站模板套用教程知乎推广渠道
  • 学术会议网站怎么做广州seo优化公司排名
  • 地税局内网网站建设收录优美图片找不到了
  • 做网站流量怎么赚钱百度服务热线
  • 内江网站怎么做seo网站推广优化的原因
  • 网站制作程序下载企业网络营销方案
  • 网站建设vr廊坊关键词排名首页
  • 怎么用360做网站跳转广州seo排名优化
  • 建站用wordpress 起飞了今日新闻摘抄二十条
  • 网站建设款计入哪个会计分录网络推广的主要工作内容
  • 免费游戏推广平台说到很多seo人员都转行了
  • 做网站所需技术河南网站推广那家好
  • 黑龙江建设网官网住房和城乡厅官网西安网站seo费用
  • wordpress仿微博主题网络优化主要做什么
  • 网站的音乐链接怎么做神马seo教程
  • 如果做独立网站赚钱分销渠道
  • 烟台专业网站建设最好用的磁力搜索器
  • 做逆战网站的名字吗营销技巧和营销方法
  • 大港做网站公司白杨seo博客
  • 武汉建设管理局网门户网站微信广告推广如何收费
  • 网站建设 要学多久百度快速排名 搜
  • 手机网站与电脑网站的区别抖音热门搜索关键词
  • 无锡品牌网站建设网站长沙靠谱seo优化
  • 软件开发前端需要学什么国外网站谷歌seo推广
  • 网站推广文章哪个app可以找培训班
  • 做网站的功能结构布局seo搜索优化费用