我想买域名com.co.uk前几天,但它似乎不可能。
我做了一个大名鼎鼎的节目,这就是输出所显示的:
Error for "com.co.uk".
This domain cannot be registered because it contravenes the Nominet UK
naming rules. The reason is:
third-level domains may not be identical to a top-level domain.
问题是,为什么我们不能买一个与顶级域名相同的第三级域名呢?另外,是否有办法获得此域?
我需要什么
我有一个这样的域名列表:
a.example.com
b.foo.com
a.b.bar.com
我只想要输出抓取第二级域名,没有其他,即,没有三级或更高。下面是我从上面的示例列表中寻找的内容:
example.com
foo.com
bar.com
我试过什么
我尝试使用sed、awk和cut,如下所示:
sed
cat domains.txt | sed 's/\.$//g'
cat domains.txt | sed -r 's/^(.*)_/\1\\/; s/.$//g' # this removes the last character
我有一个像这样(“.”)实际上不在原始文本中,而是被我用来忽略一些冗长且可能不相关的文本;^L“表示每一页的开头(注意:"^L”被键入为控制字符,而不是字符"^“和字符”L“):
(Begin text)
.. A language ...
^LIntroduction
6
A preferable alternative is ...
1.2.1 Abstraction by Parameters
Abstraction allows us, ...
^L1.2 Abstraction
7
and ...
1.2.2 Abstraction by Spec
我将类别列表显示为选择字段的选项。问题是,每个类别看起来都是一样的。即使它们是子类别。
例如,我的类别树如下所示:
category 主类别子类别第三级
但是在select字段中,它显示如下:
主类别子类别第三级类别
下面是我在表单中填充select字段的代码:
function populate_dropdown_with_product_categories( $form ) {
//product_cat is the taxonomy for WooCommerce's products
//get the terms for the product_c