Find Jobs
Hire Freelancers

Easy RegEx for PHP JavaScript

$30-250 USD

Đang triển khai
Đã đăng vào hơn 14 năm trước

$30-250 USD

Thanh toán khi bàn giao
1. We need a regular expression to split the html content into multiple pages (for pagination) and store them in PHP array. (please check the html example bellow) The end of the "page" is described with the following tag: <hr class=”some-pagebreak” /> The RegEx should find this tags and return the HTML "page sections" into a PHP array. 2. Regular expression to extract a section of text from a tag. The Regexes is needed in Javascript and PHP. This is the sample scenario where we require the Regex to work: Javascript: - Function to wrap selected html in the following tag: ‘<span class=”pragma-teaser”>’ and ‘</span>’. Please check the html example bellow. - CONDITION: There should be only one paragraph that is embedded in the above mentioned span tag . We need another Regex function that will search for an instance of this tag and if it finds it it should remove it from that paragraph an apply it to the selected html. - We also need Regex for stripping the ‘<span class=”pragma-teaser”>’ and ‘</span>’ tags if we want to remove teaser. So we need another RegEx that will remove this tag and leave the inner HTML untouched. - PHP: Extract the html content contained in ‘<p class=”pragma-teaser”>’ and ‘</p>’ for Remove ‘<p class=”pragma-teaser”>’ and ‘</p>’ when displaying the full article html EXAMPLE var html = '<h2><span class="editsection">[<a href="/w/[login to view URL];amp;action=edit&section=5" title="Edit section: Equipment">edit</a>]</span> <span class="mw-headline">Equipment</span></h2> <div class="rellink boilerplate seealso">See also: <a href="/wiki/Lightsaber" title="Lightsaber">Lightsaber</a></div> <p>Within the Star Wars universe, the Jedi are usually portrayed as dressed in simple robes and carrying specialized field gear for their missions. The most notable instrument wielded by a Jedi is the <a href="/wiki/Lightsaber" title="Lightsaber">lightsaber</a>.</p> <p>Lightsabers are used by both Jedi and Sith. Jedi commonly wield blue and green lightsabers in the movies, while the Sith tend to wield red ones. Jedi <a href="/wiki/Mace_Windu" title="Mace Windu">Mace Windu</a> (<a href="/wiki/Samuel_L._Jackson" title="Samuel L. Jackson">Samuel L. Jackson</a>) and Siri Tachi (from Expanded Universe books) wield unique purple lightsabers. Master Yaddle was known to wield an orange lightsaber. The former Jedi Padawan Ferus Olin, from Expanded Universe books, wielded a red blade. However, he was not a <a href="/wiki/Sith" title="Sith">Sith</a>.</p> <p>In the Expanded Universe of Star Wars media, there were a vast variety of lightsaber colors. In <i><a href="/wiki/Star_Wars:_Knights_of_the_Old_Republic" title="Star Wars: Knights of the Old Republic">Knights of the Old Republic</a></i> video game, the colors signified the Jedi's specialization.</p> <p><br /></p>’; var text = ‘Within the Star Wars universe, the Jedi are usually portrayed as dressed in simple robes and carrying specialized field gear for their missions. The most notable instrument wielded by a Jedi is the <a href="/wiki/Lightsaber" title="Lightsaber">lightsaber</a>.'; After replace: html = '<h2><span class="editsection">[<a href="/w/[login to view URL];amp;action=edit&section=5" title="Edit section: Equipment">edit</a>]</span> <span class="mw-headline">Equipment</span></h2> <div class="rellink boilerplate seealso">See also: <a href="/wiki/Lightsaber" title="Lightsaber">Lightsaber</a></div> <p><span class=”pragma-meta”>Within the Star Wars universe, the Jedi are usually portrayed as dressed in simple robes and carrying specialized field gear for their missions. The most notable instrument wielded by a Jedi is the <a href="/wiki/Lightsaber" title="Lightsaber">lightsaber</a>.</span></p> <p>Lightsabers are used by both Jedi and Sith. Jedi commonly wield blue and green lightsabers in the movies, while the Sith tend to wield red ones. Jedi <a href="/wiki/Mace_Windu" title="Mace Windu">Mace Windu</a> (<a href="/wiki/Samuel_L._Jackson" title="Samuel L. Jackson">Samuel L. Jackson</a>) and Siri Tachi (from Expanded Universe books) wield unique purple lightsabers. Master Yaddle was known to wield an orange lightsaber. The former Jedi Padawan Ferus Olin, from Expanded Universe books, wielded a red blade. However, he was not a <a href="/wiki/Sith" title="Sith">Sith</a>.</p> <p>In the Expanded Universe of Star Wars media, there were a vast variety of lightsaber colors. In <i><a href="/wiki/Star_Wars:_Knights_of_the_Old_Republic" title="Star Wars: Knights of the Old Republic">Knights of the Old Republic</a></i> video game, the colors signified the Jedi's specialization.</p> <p><br /></p>’;
Mã dự án: 473940

Về dự án

16 đề xuất
Dự án từ xa
Hoạt động 15 năm trước

Bạn muốn kiếm tiền?

Lợi ích khi chào giá trên Freelancer

Thiết lập ngân sách và thời gian
Nhận thanh toán cho công việc
Phác thảo đề xuất của bạn
Miễn phí đăng ký và cháo giá cho công việc
Đã trao cho:
Avatar người dùng
It is so very easy task.
$30 USD trong 0 ngày
5,0 (8 nhận xét)
3,5
3,5
16 freelancer chào giá trung bình $111 USD cho công việc này
Avatar người dùng
Please view PM to discuss ahead towards start.
$211 USD trong 4 ngày
4,8 (744 nhận xét)
9,9
9,9
Avatar người dùng
I can do usch regexp easily. Please contact.
$180 USD trong 0 ngày
5,0 (143 nhận xét)
8,9
8,9
Avatar người dùng
hello , please check pm
$50 USD trong 1 ngày
5,0 (202 nhận xét)
8,7
8,7
Avatar người dùng
I can do this work. Thanks, Suresh
$75 USD trong 2 ngày
5,0 (1238 nhận xét)
8,1
8,1
Avatar người dùng
Please check the PMB.
$125 USD trong 3 ngày
4,9 (260 nhận xét)
8,4
8,4
Avatar người dùng
I am ready to do this for you
$200 USD trong 3 ngày
4,9 (213 nhận xét)
7,9
7,9
Avatar người dùng
We can do this thanks.
$200 USD trong 0 ngày
5,0 (120 nhận xét)
7,1
7,1
Avatar người dùng
I use regex very often. Will be glad to help you.
$30 USD trong 1 ngày
5,0 (27 nhận xét)
6,0
6,0
Avatar người dùng
Hi there, please check your PMB
$70 USD trong 1 ngày
5,0 (15 nhận xét)
5,3
5,3
Avatar người dùng
would be happy to do this today for you
$80 USD trong 0 ngày
3,7 (57 nhận xét)
6,1
6,1
Avatar người dùng
I have a lot of experience with Regular expressions as well as PHP and Javascript. I can knock this project out for you in 1 day no problem.
$75 USD trong 1 ngày
5,0 (3 nhận xét)
3,8
3,8
Avatar người dùng
let me start, thanks, have a nice day, plz check your private message.
$200 USD trong 5 ngày
4,9 (8 nhận xét)
3,6
3,6
Avatar người dùng
I'd be glad to take care of this for you, please see pm
$50 USD trong 1 ngày
5,0 (2 nhận xét)
3,0
3,0
Avatar người dùng
I can do it with my strong experience in Regex. I have done 2 website already which are using Regex to extract data. Contact if interested.
$100 USD trong 1 ngày
0,0 (0 nhận xét)
0,0
0,0
Avatar người dùng
Hi,I am interested ...please check PMB -Paayal
$100 USD trong 2 ngày
0,0 (0 nhận xét)
0,0
0,0

Về khách hàng

Cờ của MACEDONIA
Skopje, Macedonia
5,0
15
Thành viên từ thg 11 9, 2004

Xác thực khách hàng

Cảm ơn bạn! Chúng tôi đã gửi email chứa đường link để bạn lấy tín dụng miễn phí.
Đã xảy ra lỗi trong khi gửi email của bạn. Hãy thử lại.
Người Dùng Đã Đăng Ký Tổng Số Việc Đã Đăng
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Đang tải xem trước
Đã cấp quyền truy cập vị trí.
Phiên đăng nhập của bạn đã hết hạn và bạn đã bị đăng xuất. Hãy đăng nhập lại.