Skip to content

Instantly share code, notes, and snippets.

View mdevo's full-sized avatar
🎯
Focusing

mdevo

🎯
Focusing
View GitHub Profile
@bludnic
bludnic / regexp_replace.sql
Created July 23, 2018 14:25
REGEXP_REPLACE for mysql
/* SELECT test */
SELECT ID, reg_replace(post_content, '<aside class="mashsb-container(.*)">((.|\n)*)<\/aside>', '', TRUE, 2, 0) as content
FROM wp_posts
WHERE post_content REGEXP('<aside class="mashsb-container(.*)">((.|\n)*)<\/aside>')
LIMIT 1
/* Update */
UPDATE wp_posts
SET post_content = REGEXP_REPLACE('post_content', '<aside class="mashsb-container(.*)">((.|\n)*)<\/aside>', '')
WHERE ID = 469
@azraai
azraai / Fpx.php
Created July 6, 2015 07:24
Fpx.php
<?php
class Fpx {
public $merchant_id;
public $prefix;
public $order_number;
public $user_email;
public $description;
public $amount;
public $exchange_id;