正则表达式包含a不包含b和c

正则表达式包含a不包含b和c

1,包含a和b:^(?=.*a)(?=.*b).*$ 补充,如果多行里面有a和b那么就是下面表达式,因为.只是正则中除了\n的任意字符,想要匹配任意字符需要(.|\n)^(?=(.|\n)*a)(?=(.|\n)*b)(.|\n)*$ 2,包含a不包含b:^((?!b.)*a((?!b).)*$ 例:包含admin且不包含abc^((?!abc).)*admin((?!abc).)*$ 3,...

经验开发 2021-11-11 PM 0条
linux 两台目录文件共享

linux 两台目录文件共享

server(10.1.1.1):yum install nfs-utils rpcbind vi /etc/exports /opt/test/ 10.1.1.2(ro,no_root_squash,no_all_squash,sync) service rpcbind start service nfs start client(10.1.1.2):yum install sh...

经验开发,基础运维 2021-09-15 PM 0条
安装containerd 与docker

安装containerd 与docker

环境安装curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg echo \ "deb [arch=amd64 signed-by=/usr/share/keyrings/do...

经验开发,基础运维 2021-05-25 PM 0条
Your CLT does not support macOS 11

Your CLT does not support macOS 11

Your CLT does not support macOS 11更新最新系统后无法使用brew installbrew install xxx然后就报错Error: Your CLT does not support macOS 11. 2 It is either outdated or was modified. 常规解决办法先删除旧的命令行工具sudo rm -rf /Librar...

经验开发 2021-04-25 PM 0条
brew update 没反应

brew update 没反应

替换brew.git 仓库地址:cd "$(brew --repo)" git remote set-url origin https://mirrors.aliyun.com/homebrew/brew.git还原cd "$(brew --repo)" git remote set-url origin https://github.com/Homebrew/brew....

经验开发 2021-04-25 PM 0条