Code: Select all
/a(b|c)|(b|c)a/Something like pseudo-code: match a at ^ or $ of subpattern.
TIA
Edit: oops, never noticed this forum. Thanks admin
Moderator: General Moderators
Code: Select all
/a(b|c)|(b|c)a/Code: Select all
$part = '(b|c)'; // by the way, better use [bc]
$regex = '/a'.$part.'|'.$part.'a/';