regex - Shortcut for matching accented characters -


regex में, शॉर्टकट हैं, जैसे \ w या az

उसी तरह, सभी चाहने वाले चिह्नों को लिखने का एक विकल्प है (उदाहरण के लिए, [éèàêâûôîùÈ ...] में \ ê )?

उदाहरण के लिए:

  $ t = "सामान्य पाठ éèàêâûôîùÈ अधिक पाठ "; Preg_match_all ('/ [^ \ P {लैटिन} \ x00- \ x80] + / u', $ t, $ m); print_r ($ मी);  

परिणाम:

  सरणी ([0] = & gt; सरणी ([0] = & gt; éèàêâûôîùÈ))  

असल में, यह सभी "लैटिन" वर्ण (= अक्षर) का चयन करता है, जो कि निम्न ascii range (= a..z) में हैं यकीन नहीं है कि अगर इसे "शॉर्टकट" कहा जा सकता है;)


Comments

Popular posts from this blog

c# - Roxy file manager in MVC doesn't accept session path -

jsp - No mapping found for HTTP request with URI with annotation config Spring MVC and Jetty -

java - Ajax call to jsp and jsp redirecting to further jsp -