简体   繁体   中英

Patterns not Matching with Regular Expressions

I am trying to create a SOA Service in eclipse. And there is one field in which I have to insert Admin Name. So whenever I am entering this as an Admin Name and I am getting this error-

Invalid Name. The name [Adcommerce, pubcommerceHelloWorldServiceV1] is not valid against the pattern "[A-Za-z]+[A-Za-z0-9_]*"

I am entering this as an Admin Name-

Adcommerce, pubcommerceHelloWorldServiceV1

Anything wrong I am entering?

The name has to start with a letter, and after that it can be multiple letters, digits and/or underscores, for example random_123 .

It cannot contain the comma and space you use there, perhaps you'd best replace it with an underscore.

There appears to be a comma in your string but not your regexp.

Maybe something like so, if you can have more that one comma:,

"[A-Za-z]+[A-Zaf-z0-9_,]*"  

or "[A-Za-z],+[A-Za-z0-9_,]*"

if the comma is always after the first "word"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM