I have 2 wild cards
- “PersonalBlue M.*Mat”
- “PersonalBlue M.*Copay.*Mat”
and both pattern are match with string “PersonalBlue M14P $3,500/80%; $35 Copay 4 Visits; 50% Rx w/Mat”
<?php
eregi(‘PersonalBlue M.*Mat’, ‘PersonalBlue M14P $3,500/80%; $35 Copay 4 Visits; 50% Rx w/Mat’, $matches);
eregi(‘PersonalBlue M.*Copay.*Mat’, ‘PersonalBlue M14P $3,500/80%; $35 Copay 4 Visits; 50% Rx w/Mat’, $matches2);
echo “<br>”;
echo strlen ($matches[0]);
echo “<br>”;
echo strlen ($matches2[0]);
?>
The length of matched string is same for both. I need the first wild card should match with the string “PersonalBlue M09P $2,500/80%; 50% Rx w/Mat” but not with the “PersonalBlue M14P $3,500/80%; $35 Copay 4 Visits; 50% Rx w/Mat”.
What will be the appropriate first wild card?