regex - what is the preg_match solution in php for matching anything between '[' and ']'? -


मेरे पास बहुत सी स्ट्रिंग हैं, जिनके पास अक्षर हैं

  [anything]   

जहां शब्द

  कुछ भी == किसी भी तरह का अक्षर, जैसे ~! @ # $% ^ & Amp; ()   

PHP में ऐसी स्ट्रिंग से मेल करने के लिए preg_match () कोड क्या होगा?

इसे आपको जो करना चाहिए, उसे करना चाहिए:

  & lt;? Php $ matches = array (); Preg_match_all ('/'[(.+?)\]/ s', $ स्ट्रिंग, $ मैचों); विदेशी मुद्रा ($ मैच [1] $ मैच के रूप में) {// क्या यहां सामग्री है }   

यह आपकी स्ट्रिंग में ब्रैकेट के बीच हर बार टेक्स्ट के माध्यम से पाशन होगा।

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -