[英]Regex to extract last two octets of IP address (3rd and 4th Octet) in Google Sheets
[英]Regex to extract first two octets of IP address in hive
我只想在蜂巢中提取IP地址的前兩個八位字節。 有人可以告訴我Hive支持的同等Regex嗎?
例如,從ip_address'192.96.45.33'提取'192.96.0.0'。
192\\.96\\.\\d{3}\\.\\d{3}
猜猜這應該在Hive使用Java
格式時起作用。
要么
192\\.96\\.(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.)(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.