这是场景:
Running with gitlab-runner 10.4.0-rc1 (fb4078b3)
on docker-auto-scale (fa6cab46)
Using Docker executor with image registry.gitlab.com/gitlab-examples/kubernetes-deploy ...
Using docker image sha256:f5f6ae0793e2d8907a16c95a4062bc93a98de76e5caf476afdd75a55f0a4808c for predefined container...
Pulling docker image registry.gitlab.com/gitlab-examples/kubernetes-deploy ...
Using docker image registry.gitlab.com/gitlab-examples/kubernetes-deploy ID=sha256:94b90ce9f86870a6ad41b6696878dcd3f3053a34547e55acc90de6c6bdc09735 for build container...
Running on runner-fa6cab46-project-5122416-concurrent-0 via runner-fa6cab46-srm-1515712084-0dfb4a6e...
Cloning repository...
Cloning into '/builds/Cardamone/gulp-bootstrap-kickstart'...
Checking out 64575330 as master...
Skipping Git submodules setup
$ command build
Checking docker engine...
Missing …
Run Code Online (Sandbox Code Playgroud) google-compute-engine google-kubernetes-engine google-container-os
我有一个像这样的字符串作为脚本的json响应:
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, HTTP://unknown/string/in/unknown/place/ , sed do eiusmod tempor incididunt ut labore et dolore magna aliqua"
Run Code Online (Sandbox Code Playgroud)
有没有办法取代 使用正则表达式和php preg_replace的空字符串?
我不熟悉正则表达式,你能提供一个例子吗?我基本上需要删除以'http'开头的子字符串,并以空格结束,如果可能的话.
谢谢