Questions about PHP regular expression matching... tutorial! [Q] Thanks for your selfless help. thank you! (& nbsp ;) [A] thank you [B] thank you very much [C] thank you very much [D] thank you very much [E] 100,000 thank you [F] [K] D How to use the above strings regular expressions remove [Q], [A], [B], [C], [D], [E], [F], and [K, combine the remaining strings into an array to learn more about PHP regular expression matching... ask for advice!
[Q] Thank you for your selfless help. thank you () [A] thank you [B] thank you very much [C] thank you very much [D] thank you very much [E] 100,000 thank you [F] million thank you [K] D
How to remove [Q], [A], [B], [C], [D], [E], [F], and [K] from the above strings using regular expressions?, combine the remaining strings into an array!
------ Solution --------------------
$ S = '$ Q] Thank you for your selfless help. thank you () [A] thank you [B] thank you very much [C] thank you very much [D] thank you very much [E] 100,000 thanks to [F] [K] d ';
$ Ar = preg_split ('/\ [A-Z] \]/', $ s );