English 中文(简体)
预先表示数据:估算(任何数据)”
原标题:regex expression to preg_replace data:image(anything)"

符合以下顺序的规定:

data:image(any number of characters except of doublequotes)"

因此,从“数据:估算”开始(可在探测、开端、中间的任何部分进行),除“数据”的末尾外,其次为0或更多。

我想在预选中加以使用,这样一来就可以“超越”这种不想要的系列特征。

最佳回答

首先与字面文本<代码>数据:image 相吻合,然后是0或更多特性,即t <代码>, 之后是

问题回答

如果你只想数据:估计:

$string = preg_replace( /data:image[^"]*"$/ ,  data:image" , $string);

如果你只想另一方面:

$string = preg_replace( /data:image([^"]*)"$/ ,  1 , $string);




相关问题
Brute-force/DoS prevention in PHP [closed]

I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

定值美元

如何确认来自正确来源的数字。

Generating a drop down list of timezones with PHP

Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

How does php cast boolean variables?

How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...

热门标签