regular expression for matching two ip address with a hyphen symbol between it
<p>i have tried it using the following regular expression but couldn't match my requirement.
Can anyone help me pls.... must match the ip addresses in the below example format
Example- 111.222.222.111- 222.112.1.2 (assume) or single ip address.
here's my regular expression:</p>

<pre><code>(^((([0-9]{1,2})|(1[0-9]{2,2})|(2[0-4][0-9])|(25[0-5])|\\*)\\.){3}(([0-9]{1,2})|(1[0-9]{2,2})|(2[0-4][0-9])|(25[0-5])|\\*)$) | ^((([0-9]{1,2})|(1[0-9]{2,2})|(2[0-4][0-9])|(25[0-5])|\\*)\\.){3}(([0-9]{1,2})|(1[0-9]{2,2})|(2[0-4][0-9])|(25[0-5])|\\*))(\\-)^(([0-9]{1,2})|(1[0-9]{2,2})|(2[0-4][0-9])|(25[0-5])|\\*)\\.){3}(([0-9]{1,2})|(1[0-9]{2,2})|(2[0-4][0-9])|(25[0-5])|\\*)$")
</code></pre>
