How to write this regular expression? 0 ^ 50411 ^ 1 ^ 10 ^ 5.0000 ^ 1900-01-01 ^ 0 ^ & nbsp; 10 & nbsp; ^ 58 ^ yuan/person ^ Youbang insurance $1 ^ 50411 ^ 1 ^ 20 ^ 5.0000 ^ 1900-01-01 ^ 0 ^ & nbsp; 20 & nbsp; ^ 59 ^ yuan/person ^ Ping An Insurance $2 ^ 5 How to write this regular expression?
0 ^ 50411 ^ 1 ^ 10 ^ 5.0000 ^ 1900-01-01 ^ 0 ^ 10 ^ 58 ^ RMB/person ^ Youbang insurance
$1 ^ 50411 ^ 1 ^ 20 ^ 5.0000 ^ 1900-01-01 ^ 0 ^ 20 ^ 59 ^ RMB/person ^ Ping An Insurance
$2 ^ 57777 ^ 1 ^ 60 ^ 50.0000 ^ 2012-12-19 ^ 633183 ^ 60 ^ 13 ^ RMB/person ^ AAAAAA
$3 ^ 57777 ^ 1 ^ 60 ^ 50.0000 ^ 2012-12-20 ^ 633183 ^ 60 ^ 13 ^ yuan/person ^ BBBBBB
This string of characters,
I want to use/\ $ \ d/to split a regular expression by $1, $2, and $3,
But this is not the case!
Then, use ^ to separate each array sub-element and obtain the names such as AIA and Ping An Insurance.
/\ ^/Cannot be written in this way, so strange!
------ Solution --------------------
$ S = <TXT
0 ^ 50411 ^ 1 ^ 10 ^ 5.0000 ^ 1900-01-01 ^ 0 ^ 10 ^ 58 ^ RMB/person ^ Youbang insurance
$1 ^ 50411 ^ 1 ^ 20 ^ 5.0000 ^ 1900-01-01 ^ 0 ^ 20 ^ 59 ^ RMB/person ^ Ping An Insurance
$2 ^ 57777 ^ 1 ^ 60 ^ 50.0000 ^ 2012-12-19 ^ 633183 ^ 60 ^ 13 ^ RMB/person ^ AAAAAA
$3 ^ 57777 ^ 1 ^ 60 ^ 50.0000 ^ 2012-12-20 ^ 633183 ^ 60 ^ 13 ^ yuan/person ^ BBBBBB
TXT;
Preg_match_all ('/[^] + $/M', $ s, $ r );
Print_r ($ r );
Array
(
[0] => Array
(
[0] => AIA
[1] => Ping An Insurance
[2] => AAAAAA
[3] => BBBBBB
)
)