=ARRAYFORMULA(REGEXEXTRACT(A2:A;".*?gclid=(.*)$"))
function run() {
const sheet = SpreadsheetApp.getActiveSpreadsheet()
.getSheetByName('Решение (скриптами)');
const range = sheet.getRange('A:A');
const values = range.getValues();
const data = values.map(row => {
const [undefined, value] = String(row[0]).split('gclid=');
return [value ?? ''];
});
range.setValues(data);
}
from bs4 import BeautifulSoup
html = """
<html><head><title>Example</title><style>body {color: red}</style></head>
<body>
<ul class="list">
<li>One</li>
<li>Two</li>
<li>Three</li>
</ul>
<script>alert('alarm');</script>
</body>
</html>
"""
soup = BeautifulSoup(html, 'html.parser')
# 1. замена тегов
for ul in soup.find_all('ul'):
ul.name = 'div'
for li in soup.find_all('li'):
li.name = 'span'
# 2. втавка тега
meta = soup.new_tag('meta')
meta.attrs['charset'] = 'utf-8'
soup.find('head').insert_after(meta)
# 3. очистка контента внутри тега
soup.find('script').clear()
# 4. вставка текста
soup.find('head').find('style').append('html {background: black}')
print(soup.prettify())
<?php
$url = 'http://username:password@hostname/path?arg=value#anchor';
print_r(parse_url($url));
echo parse_url($url, PHP_URL_PATH);
Array
(
[scheme] => http
[host] => hostname
[user] => username
[pass] => password
[path] => /path
[query] => arg=value
[fragment] => anchor
)
chown -R www-data:www-data /var/www/site.com/html/app