Bedigit
  • Products
  • Add-Ons
  • Support
A Software Development Company A Software Development Company A Software Development Company
  • Products
  • Add-Ons
  • Support

Regex

0
By admin
In Apache, Regex
Posted September 17, 2018

Redirect non-www URLs to www

# Redirect non-www URLs to www RewriteCond %{HTTP_HOST} !^www.domain.tld$ [NC] RewriteRule ^(.*)$ http://www.domain.tld/$1 [R=301,L]

READ MORE
0
By admin
In PHP, Regex
Posted September 17, 2018

PHP – Print CSS code in HTML

Print CSS code in HTML: /** * Print CSS code in HTML * * @param $code * @return mixed */ function printCss($code) { $code = preg_replace('/<[^>]+>/i', '', $code); $code = '<style [...]

READ MORE
0
By admin
In PHP, Regex
Posted September 17, 2018

PHP – Print any JavaScript code (External / Internal) in HTML

Print any JavaScript code (External / Internal) in HTML: /** * Print JavaScript code in HTML * * @param $code * @return mixed */ function printJs($code) { // Get the External JS, and make for [...]

READ MORE
0
By admin
In PHP, Regex
Posted September 17, 2018

Extract only digit characters from string

Extract only numeric characters from a string /** * Extract only numeric characters * * @param $string * @return mixed */ function extractNumericCharsFromStr($string) { $numericChars = [...]

READ MORE
0
By admin
In Regex, Tools
Posted September 17, 2018

Regex – How to match everything except a particular pattern?

Match everything except for specified strings   You could use a look-ahead assertion: (?!999)\d{3} This example matches three digits other than 999. But if you happen not to have a regular [...]

READ MORE
0
By admin
In PHP, Regex
Posted September 16, 2018

Regex – Good Practice in Regular Expressions

Regular Expressions are the Swiss Army knife for searching through information for certain patterns. They have a wide arsenal of tools, some of which often go undiscovered or underutilized. [...]

READ MORE
Categories
  • Apache (19)
  • Bash (9)
  • CSS/HTML (3)
  • Git (1)
  • JavaScript (7)
  • jQuery (4)
  • Laravel (18)
  • Linux (6)
  • MySQL (17)
  • Nginx (2)
  • PHP (42)
  • Programming (3)
  • Regex (6)
  • Tools (10)
  • Uncategorized (1)
  • Vue.js (1)
  • WordPress (1)




© Bedigit - All Rights Reserved.
  • Icon Generator
  • Support Policy
  • Terms and Conditions
  • Blog