Hi Experts, I am facing issues in getting the correct regexp for this use-case. Sorry for the 2nd question of the day :-(
pci@0000:19:00.0 pci@0000:19:00.1 pci@0000:5e:00.2 pci@0000:5e:00.3 pci@0000:d8:00.0 pci@0000:d8:00.1 I need to fetch "0000:19:00.0" through "0000:d8:00.1" in a string.. I used the below regexp and was successful for "0000:19:00.0", but the same doesnt work for 5e or d8 and vice versa r := regexp.MustCompile(`(\d*([a-f]*):\d*([a-f]*):\d+.\d+)`) yields - [{ 0000:19:00.0} { 0000:19:00.1} { } { } { } { }] (or) r := regexp.MustCompile(`(\d*([a-f]*):\d+([a-f]*)|([a-f]+)\d+:\d+.\d+)`) yields - [ 0000:19} { 0000:19} { d8:00.0} { d8:00.1} { d8:00.2} { d8:00.3}] Please share your thoughts. Sharan -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAGOT8apn1BQVGQA3_z%2BrMk9fv0JrMB6QYwjnG%3Dq8g2TXBTkJuA%40mail.gmail.com.