How do you write this?
0^50411^1^10^5.0000^1900-01-01^0^ 10 ^58^ yuan/person ^ ^^ ^ AIA
$1^50411^1^20^5.0000^1900-01-01^0^ 20 ^59^ yuan/person ^ ^^ ^ Ping An insurance
$2^57777^1^60^50.0000^2012-12-19^633183^ 60 ^13^ yuan/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 the/\$\d/as a regular division separated by the $1,$2,$3,
But it doesn't work that way!
And then use the ^^ ^^ to separate the sub-elements of each group, to obtain AIA, ping An insurance and other names
/\^\^\^\^/is not so good at writing, Curiosity is strange!
------Solution--------------------
$s = <<< TXT
0^50411^1^10^5.0000^1900-01-01^0^ 10 ^58^ yuan/person ^ ^^ ^ AIA
$1^50411^1^20^5.0000^1900-01-01^0^ 20 ^59^ yuan/person ^ ^^ ^ Ping An insurance
$2^57777^1^60^50.0000^2012-12-19^633183^ 60 ^13^ yuan/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 Insurance
[1] = ping Insurance
[2] = aaaaaa
[3] = BBBBBB
)
)