In mailto replace subject and body adding 20 instead space in all file php using notepad

0 votes

I do have a query... Each post or comment on my blog has a mailto field with the subject and content, but there is a blank space in between the words that I would like to change by 20 percent to improve the HTML validity. Every mailto has a unique subject and body, so I want to replace them all using notepad++ regex that only matches strings of this kind:

<A HREF="mailto:pippo@pluto.it?subject=Diario: Tanto per ridere un p&ograve;...&amp;body=Gentile visitatore, La informo che messaggi offensivi o volgari verranno scartati, buona prosecuzione." CLASS="hyperlink">Pippo Pluto</A>

<A HREF="mailto:topolino@paperino.it?subject=Diario: Dead Space e Dead Sapce 2&amp;body=Gentile visitatore, La informo che messaggi offensivi o volgari verranno scartati, buona prosecuzione." CLASS="hyperlink">Paolino Paperino</A>

As result I'd like to have:

<A HREF="mailto:picodepaperis@dysney.it?subject=Diario:%20Neutrini%20sfondano%20i%20300.000%20Km/s&amp;body=Gentile%20visitatore,%20La%20informo%20che%20messaggi%20offensivi%20o%20volgari%20verranno%20scartati,%20buona%20prosecuzione." CLASS="hyperlink">De Paperis Pico</A>

I want to use a regular expression in Notepad++ to process all of my 560 PHP files that have blank spaces.

I created a regex that only looks for the mailto string and ignores any blank spaces.

<A HREF=\"mailto:([^"]*)\" CLASS="hyperlink">

Can someone please help me with this?

Aug 4, 2022 in PHP by Kithuzzz
• 38,000 points
531 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In PHP

0 votes
1 answer

How can I include a php file and also send query parameters in php?

Hello, You could do something like this to ...READ MORE

answered Nov 10, 2020 in PHP by Niroj
• 82,840 points
6,231 views
0 votes
1 answer

What is meant by passing the variable by value and reference in PHP?

Hello, When the variable is passed as value ...READ MORE

answered Mar 27, 2020 in PHP by Niroj
• 82,840 points
3,278 views
0 votes
1 answer

What is type casting and type juggling in php?

Hey, The way by which PHP can assign ...READ MORE

answered Mar 27, 2020 in PHP by Niroj
• 82,840 points
7,196 views
0 votes
1 answer

How can you upload a file using PHP?

Hello, To upload a file by using PHP, ...READ MORE

answered Mar 27, 2020 in PHP by Niroj
• 82,840 points
866 views
0 votes
1 answer

Error:“Notice: Undefined variable”, “Notice: Undefined index”, and “Notice: Undefined offset” using PHP

Hello @kartik, The best way for getting input string is: $value ...READ MORE

answered Apr 1, 2020 in PHP by Niroj
• 82,840 points
37,566 views
0 votes
1 answer

How to merge two arrays while keeping keys instead of reindexing in php?

Hello, Considering that you have $replaced = array('1' => ...READ MORE

answered Apr 1, 2020 in PHP by Niroj
• 82,840 points
3,042 views
0 votes
1 answer

Generator URL Friendly SEO PHP with .htaccess

Options +FollowSymLinks -MultiViews RewriteEngine on RewriteBase / # skip all ...READ MORE

answered Feb 14, 2022 in Others by narikkadan
• 63,600 points
4,467 views
0 votes
1 answer

mod_rewrite seo friendly url passed as parameter only works with prefix on url

RewriteEngine On RewriteRule ^content/get_content.php\?url\=seo-friendly-url$ /content/seo-friendly-url [L] try this code ...READ MORE

answered Feb 24, 2022 in Others by narikkadan
• 63,600 points
1,782 views
0 votes
1 answer

mod_rewrite seo friendly url passed as parameter only works with prefix on url

RewriteEngine On RewriteRule ^content/get_content.php\?url\=seo-friendly-url$ /content/seo-friendly-url [L] try this code ...READ MORE

answered Feb 27, 2022 in Others by narikkadan
• 63,600 points
684 views
0 votes
1 answer

Using .htaccsess Generator URL Friendly SEO PHP

Options +FollowSymLinks -MultiViews RewriteEngine on RewriteBase / # skip all ...READ MORE

answered Feb 27, 2022 in Others by narikkadan
• 63,600 points
607 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP