I need help forming a specific regular expression(Example Inside)
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/
精彩评论