Forum Moderators: coopster
I've tried a few ways to do it, but keep failing:
preg_match("/(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})\s[-]\s(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})/", $lines[$i], $y)
Can anyone point me in the right direction?
Thanks.
preg_match("/123\.(4¦5)(4¦5)6\.789\.\d{3}/", $lines[$i], $y);
Depending on the exact range, you might need to adjust the above and will need to replace the broken bar ¦ with a bar... The bar means 'or' so the above matches:
123. followed by 4 or 5 followed by 4 or 5 followed by 6. followed by 789. followed by 'Any Three Numbers'