| 148 | |
| 149 | |
| 150 | def select_ipv4_range(view): |
| 151 | pattern = r'(1\d{2}|2[0-4]\d|25[0-5]|[1-9]\d|[1-9])\.(1\d{2}|2[0-4]\d|25[0-5]|[1-9]\d|\d)\.(1\d{2}|2[0-4]\d|25[0-5]|[1-9]\d|\d)\.(1\d{2}|2[0-4]\d|25[0-5]|[1-9]\d|\d)((([\-](1\d{2}|2[0-4]\d|25[0-5]|[1-9]\d|[1-9])|/(1\d|2\d|3[0-2]|[1-9]))(\.(1\d{2}|2[0-4]\d|25[0-5]|[1-9]\d|\d)\.(1\d{2}|2[0-4]\d|25[0-5]|[1-9]\d|\d)\.(1\d{2}|2[0-4]\d|25[0-5]|[1-9]\d|\d))?))' |
| 152 | regions = view.find_all(pattern) |
| 153 | ips = [] |
| 154 | for region in regions: |
| 155 | text = view.substr(region) |
| 156 | ips.append(text) |
| 157 | |
| 158 | return unique_sort_ipv4(ips) |
| 159 | |
| 160 | |
| 161 | def select_ipv4_port(view): |