के माध्यम से शब्दों का एक सेट नकारात्मक करना मैं जावा रेगेक्स का उपयोग करके शब्दों के एक सेट को अस्वीकार करना चाहता हूं।जावा रेगेक्स
कहें, मैं cvs
, svn
, nvs
, mvc
को अस्वीकार करना चाहता हूं। मैंने एक रेगेक्स लिखा जो ^[(svn|cvs|nvs|mvc)]
है।
कुछ ऐसा लगता है कि यह काम नहीं कर रहा है।
संभावित डुप्लिकेट: http://stackoverflow.com/questions/42990/regex-to-match-against-something-that-is-not-a-specific-substring – finnw
यह भी देखें: http://stackoverflow.com/questions/406230/regular-expression-to-match-string-not-containing-a-word – finnw
... और http://stackoverflow.com/questions/717644/ नियमित-अभिव्यक्ति-वह-नहीं-युक्त-निश्चित-स्ट्रिंग – finnw