Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
PCI 地址遵循BDF 表示法
确定字符串是否包含有效 PCI 地址的好方法是什么?任何编程语言都可以。
所以我想出了以下正则表达式(javascript)来涵盖基本的 BDF:
^([a-fA-F0-9]{2}|[a-fA-F0-9]{4}):[a-fA-F0-9]{2}\.[a-fA-F0-9]{1,2}$
扩展它以覆盖 BDF 的扩展版本应该不会那么难。