Small Regex job

进行中 已发布的 5 年前 货到付款
进行中 货到付款

I need a REGEX (PHP) which does the following:

Look for "*word1*" in a multiple line text string, and replace the entire text string (not only the word1) with "word2" if found "*word1*", and replace the entire text string with "" (blank) if not found "*word1*"

This must be one regex expression doing this and NOT a php code "if / else clause".

JavaScript PHP 软件构架 网页搜罗

项目ID: #18645674

关于项目

3个方案 远程项目 活跃的5 年前

有3名威客正在参与此工作的竞标,均价$50/小时

fakhirsiddiqi

Have extensive experience in regex not only on php but also on javascript, python, java and Oracle. Guaranteed finish in a day.

$25USD 在1天里
(2条评论)
1.5
pksalo6

Hello.. I am priyankush I am having Digital Agency running here in India by which we are providing various digital services including but not limited to Website Designing, Website Developments, Mobile Application Devel 更多

$99 USD 在5天内
(0条评论)
0.0
raigenputhoor

Hi I am Interested in your project. Please message me to discuss details about the work. Best Regards

$25USD 在1天里
(0条评论)
0.0