我需要验证域名注册,因为它不能只由数字和验证需要适合我的算法工作的方式,即返回完整的域名(没有.com,.net等扩展名),如果它是正确的。
我尝试了几个表达式,但都没有成功:
^[^0-9]+$ # that one wont let he type a number
^\w[^0-9]+\w$ # that wont work too
有人能帮我吗?
给出一个Maybe Int,我试着将它mappend到自己。
$let x = Just 55 :: Maybe Int
$mappend x x
<interactive>:126:1:
No instance for (Monoid Int) arising from a use of `mappend'
In the expression: mappend x x
In an equation for `it': it = mappend x x
看着,我看到:
么半群a =>么半群(可能是a)
由于不实现Monoid类型类