use*_*916 1 php regex preg-match
我有这个正则表达式:
'/^ANSWER\:(.+?)$/'
Run Code Online (Sandbox Code Playgroud)
我知道这大致翻译为:
以"ANSWER:"开头的字符串......
我不确定是什么
(.+?)$
Run Code Online (Sandbox Code Playgroud)
翻译成?任何帮助将不胜感激!
( # begin capturing group
.+? # match any character (.) one or more times (+) as few times as possible (?)
) # end capturing group
$ # end of string anchor (or end of line anchor, if multiline option is enabled)
Run Code Online (Sandbox Code Playgroud)
以下链接有一个很好的正则表达式语法摘要:http:
//www.regular-expressions.info/reference.html