java - regular expression for string " a123ab-lift(admin-hat)" -


मैं regex को जानना चाहता हूं जो

a123ab-lift (व्यवस्थापक-हैट )

मेरी स्ट्रिंग में वर्णमाला, संख्याएं और वर्ण हो सकते हैं "(", ")", "-"

निम्न कार्य करेगा।

  [a-zA-Z0-9 () -] *   

उदाहरण:

  स्ट्रिंग s = "a123ab-lift (व्यवस्थापक-टोपी)"; पैटर्न p = Pattern.compile ("[a-zA-Z0- 9 () -] *"); मैचर एम = पी। मेटचर (एस); Println (m.matches ()); // True    

Comments

Popular posts from this blog

python - how we can use ajax() in views.py in django? -

matlab - Using loops to get multiple values into a cell -

python - Sequence Pattern recognition with Pybrain -