Find Jobs
Hire Freelancers

Javascript code with regexp to find <img> inside a <p> and replace it

$10-30 USD

Ukończony
Opublikowano prawie 6 lat temu

$10-30 USD

Płatne przy odbiorze
It should use regexp and pure javascript. No jQuery, no selectors, no DOM, etc. I have a HTML content in a javascript string in the following format: <p>text text text <img class="class1" alt="alt" src="http://..."> text2 text2 text2 <img class="class2" alt="alt2" src="http://..."></p> <img class="class3" alt="alt" src="http://..."> <p>text3 text3 text3 <img class="class4" alt="alt" src="http://..."> text4 text4 text4 <img class="class5" alt="alt5" src="http://...">text</p> I want a regexp which breaks the <p> tag when it find a <img> tag inside a <p>, basically replacing "<img>" by "</p><img><p>". The script should also replace blank <p> tags, like "<p></p>"; The result should be: <p>text text text </p> <img class="class1" alt="alt" src="http://..."> <p>text2 text2 text2</p> <img class="class2" alt="alt2" src="http://..."> <img class="class3" alt="alt" src="http://..."> <p>text3 text3 text3 </p> <img class="class4" alt="alt" src="http://..."> <p>text4 text4 text4 </p> <img class="class5" alt="alt5" src="http://..."> <p>text</p> need it in like 1-2 hours.
Identyfikator projektu: 17399995

Informację o projekcie

8 ofert
Zdalny projekt
Aktywny 6 lat temu

Szukasz sposobu na zarobienie pieniędzy?

Korzyści ze składania ofert na Freelancer.com

Ustal budżet i ramy czasowe
Otrzymuj wynagrodzenie za swoją pracę
Przedstaw swoją propozycję
Rejestracja i składanie ofert jest bezpłatne
Przyznano:
Awatar Użytkownika
hey buddy, i can do that ! i interned with an american company proace international shopping mall you can check my work sample here www.proaceintlshoppingmall.com. and [login to view URL] and other was angular js development internship with [login to view URL]
$10 USD w 1 dzień
5,0 (1 opinia)
0,0
0,0
8 freelancerzy składają oferty o średniej wysokości $24 USD dla tej pracy
Awatar Użytkownika
⭐⭐⭐⭐⭐⭐hello i can finish your project in 1-2hours⭐⭐⭐⭐⭐⭐ I am Expert with 4+years experience. This is my profile::https://www.freelancer.com/u/bengalTIGER1106 I read your requirements. I have a good skills for implements your project. I will do best possible to provide perfect results. Just say the word and i will take care of it ⭐⭐⭐⭐⭐⭐Thanks .⭐⭐⭐⭐⭐⭐
$50 USD w 0 dzień
4,9 (54 opinii)
6,5
6,5
Awatar Użytkownika
Hi, so you want to remove the image tag from all p tags? Thanks. Sergio. ------------------------------
$25 USD w 1 dzień
5,0 (30 opinii)
5,7
5,7
Awatar Użytkownika
Hi Nice to bid on your project My name is Shan Bin and I am a chinese developer I am expert on regular expresion Please hire me I can finish it in 1 hour thanks Shan Bin
$35 USD w 1 dzień
4,9 (14 opinii)
5,3
5,3
Awatar Użytkownika
Hello , i am expert in javascript and can do this task ...........Message me i can do this now .......
$15 USD w 1 dzień
5,0 (8 opinii)
3,6
3,6

O kliencie

Flaga BRAZIL
Sao Paulo, Brazil
5,0
21
Zweryfikowana metoda płatności
Członek od kwi 4, 2013

Weryfikacja Klienta

Dziękujemy! Przesłaliśmy Ci e-mailem link do odebrania darmowego bonusu.
Coś poszło nie tak podczas wysyłania wiadomości e-mail. Proszę spróbować ponownie.
Zarejestrowani Użytkownicy Całkowita Liczba Opublikowanych Projektów
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Wczytywanie podglądu
Udzielono pozwolenia na Geolokalizację.
Twoja sesja logowania wygasła i zostałeś wylogowany. Proszę, zalogować się ponownie.