开发者

I need help forming a specific regular expression(Example Inside)

开发者 https://www.devze.com 2023-01-26 15:17 出处:网络
I need to build a regular expression that finds a string of this format: [name] => X\\n Where X is equal to the name of something and \\n is a line break.I would like to somehow return X in an a

I need to build a regular expression that finds a string of this format:

[name] => X\n

Where X is equal to the name of something and \n is a line break. I would like to somehow return X in an array us开发者_C百科ing preg_match.


^\[.*\] => (.*)$

http://rubular.com/

0

精彩评论

暂无评论...
验证码 换一张
取 消