我有一个来自会话的数据,我想基于正则表达式进行解析。以下是我想要登录的 3 个数据,名字和姓氏。
login = James
firstName = James.S
lastName = Steal
Array (
[user] => __PHP_Incomplete_Class Object (
[__PHP_Incomplete_Class_Name] => DEX_User
[permissionID:DE_User:private] => 9
[login:DE_User:private] => James.S
[email:DE_User:private] => james.s@domain.com
[firstName:DE_User:private] => James
[lastName:DE_User:private] => Steal
[title:DE_User:private] => Warehouse Man
[manager:DE_User:private] => Manager's Name
[workPhone:DE_User:private] => +1 (111) 111-1111
[mobilePhone:DE_User:private] => +1 (222) 222-2222
[homePhone:DE_User:private] => +1 (333) 333-3333
[im:DE_User:private] =>
[timeDelta:DE_User:private] => Asia/Hongkong
[lastLogin:DE_User:private] => __PHP_Incomplete_Class Object (
[__PHP_Incomplete_Class_Name] => GB_Date
[valueStored:protected] => 13545544126666309821
[mode:protected] => BASE
[master:protected] =>
)
[description:DE_User:private] => Warehouse Engineer
[isActive:DE_User:private] => __PHP_Incomplete_Class Object (
[__PHP_Incomplete_Class_Name] => GB_Boolean
[valueStored:protected] => 1
[mode:protected] => BASE
[master:protected] =>
)
[isTerminate:DE_User:private] => __PHP_Incomplete_Class Object (
[__PHP_Incomplete_Class_Name] => GB_Boolean
[valueStored:protected] =>
[mode:protected] => BASE
[master:protected] =>
)
[id:protected] => 231968
[isModifyed:protected] =>
[needInsert:protected] =>
[isDeleted] =>
[isRemoved] =>
)
[enter_password] => 2asas(qwqw)
我试图执行正则表达式'/\[[\/]?[A-Za-z0-9]+\]/';
,但我只能在括号内得到它。
谢谢你。