本文介绍了定期表达以下字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有字符串,其字母数字如下所示。



例1:abc1232323acvc23232avac

Ex 2:abc1232bcsb



这里我想检查字符串是否为字母数字以及连续数字长度不应超过7.





我试过但我无法得到正确的正则表达式。



请帮助我这个



我尝试了什么:



尝试用

I have string with is having the alpha numeric noted as below.

Ex 1: abc1232323acvc23232avac
Ex 2: abc1232bcsb

Here I want to check the string is alpha number as well as continuous numeric length should not exceed more than 7.


I have tried but I couldn't get the proper regular expression.

Kindly help me on this

What I have tried:

Tried with

(([a-z]+[0-9]+)+|(([0-9]+[a-z]+)+))[0-9a-z]{0.7}*

推荐答案


这篇关于定期表达以下字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-22 22:22