我现在有两个preg_match_all()正在运行,我想把它们合并成一个。每一个都会查找functionA或functionB的匹配项。我知道使用" this | that“来匹配这个或那个,但是当涉及到匹配"%this()”或"%that()“时,我不确定是否最好匹配"%this()|%that()”,或者是否有一种方法来绑定“|”两边包含的内容,以编写像"%this|that()“这样的简短内容,我相信它将匹配"%this
我有一组字符串和一组数组单词。我需要一个函数,它用字符串从数组中返回匹配的单词。下面是字符串和数组的示例
$string = "Name the structures undercover of flexor retinaculum of the foot.matchList = array( "Hyperactivity","flexor","Adjustment","retinaculum","name", &