Ok.... this isn't a PHP specific question, but since it's the PHP implementation I'm concerned about this was the best place I could think to post...
I want to find the word version as many times as it appears. Simple as that, right?
Works just fine, as expected...
Has no matches, as expected....
So I'm scratching my head on how to get the word version appropriately without being thwarted by BOF and EOF occurences. (Because VersionString should fail this match is the reason for the \W's btw)
Anyway, I know this isn't hard, but I'm temporarily stumped and would appreciate some nudges
I want to find the word version as many times as it appears. Simple as that, right?
Code:
$pattern = '/\W+(Version)\W+/';
$subject = 'Abc Version Def';
Works just fine, as expected...
Code:
$subject = 'Version';
So I'm scratching my head on how to get the word version appropriately without being thwarted by BOF and EOF occurences. (Because VersionString should fail this match is the reason for the \W's btw)
Anyway, I know this isn't hard, but I'm temporarily stumped and would appreciate some nudges