开发者

Regex for specific problem

开发者 https://www.devze.com 2023-01-07 17:47 出处:网络
I\'m not very familiar to regex and even not able (maybe too tired?) to use this silly newby issue: I need a regex, that allows any combination of numbers, letters (lower and upper case) and the unde

I'm not very familiar to regex and even not able (maybe too tired?) to use this silly newby issue:

I need a regex, that allows any combination of numbers, letters (lower and upper case) and the underscore _

BUT: The beginning of this regex shall be fix and defined in my source code::

ABC_h2u3h4l
ABCijij4i5oi4j5
ABCABC

Here the piece "ABC" always has to be at the leading posi开发者_JAVA技巧tion.

Can someone give me a hint?


that's the whole regex:

^ABC\w+


Something like this?

^ABC\w+$


^ABC[a-zA-Z0-9_]*$
0

精彩评论

暂无评论...
验证码 换一张
取 消