python - How i can do this regex simple? -


मेरे पास यह regex है:

  "\ w {4} [एडी] {1 } [विज्ञापन] * \ s * " 

मैं [एडी] {1} [विज्ञापन] * \ s * के साथ कई बार कैसे दोहरा सकता हूं * जैसा कुछ

तो अगर मेरे पास अभिव्यक्ति है:

  "Bed0Dabc Babc Cabb99rrAbaaaa Daaab"  
< पी> रेगेक्स मुझे देगा:

  "Bed0Dabc Babc Cabb" "99rrAbaaaa Da"  

आपका regex अमान्य है और शुरुआत में" \ "की कमी है, आपका वांछित आउटपुट भी अमान्य है और दूसरा स्ट्रिंग" 99rrAbaaaa Daa "होना चाहिए।

मेरा मानना ​​है कि आपका क्या मतलब है समूह है, हालांकि यह एक बहुत ही मूल अवधारणा है, आपको उन्हें प्रयोग करने से पहले नियमित अभिव्यक्तियों के बारे में अधिक पढ़ना चाहिए। वांछित regex:

  \ w {4} ([A-D] [a-d] * \ s *) +  

Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -