This is the best I have so far using regex:
Find:
<((?!\s*((a)\s+))\w+)(.*?)((?:src|href)\s*=\s*")((?!\{\{\s*)[^"]+)"
Replace with:
<$1$4$5{{ asset('$6') }}"
| $('form').submit(function (event) { | |
| event.preventDefault(); | |
| var _this = $(this); | |
| $.ajax({ | |
| type: "POST", | |
| url: _this.attr('action'), | |
| data: new FormData(this), | |
| processData: false, | |
| contentType: false, | |
| success: function (data) { |
This is the best I have so far using regex:
Find:
<((?!\s*((a)\s+))\w+)(.*?)((?:src|href)\s*=\s*")((?!\{\{\s*)[^"]+)"
Replace with:
<$1$4$5{{ asset('$6') }}"
| const arr = [ | |
| { id: 1, name: "king" }, | |
| { id: 2, name: "master" }, | |
| { id: 3, name: "lisa" }, | |
| { id: 4, name: "ion" }, | |
| { id: 5, name: "jim" }, | |
| { id: 6, name: "gowtham" }, | |
| { id: 1, name: "jam" }, | |
| { id: 1, name: "lol" }, | |
| { id: 2, name: "kwick" }, |
| RewriteEngine On | |
| RewriteCond %{REQUEST_URI} !^/public/ | |
| RewriteRule ^(.*)$ /public/$1 [L,QSA] |
| DB::table('data_location_country')->delete(); | |
| $data = array( | |
| ['slug' => 'AF', 'title' => 'Afghanistan', 'native' => 'غانستان'], | |
| ['slug' => 'AX', 'title' => 'Åland Islands', 'native' => 'Åland'], | |
| ['slug' => 'AL', 'title' => 'Albania', 'native' => 'Shqipëri'], | |
| ['slug' => 'DZ', 'title' => 'Algeria', 'native' => 'الجزائر'], | |
| ['slug' => 'AS', 'title' => 'American Samoa', 'native' => ''], | |
| ['slug' => 'AD', 'title' => 'Andorra', 'native' => ''], | |
| ['slug' => 'AO', 'title' => 'Angola', 'native' => ''], | |
| ['slug' => 'AI', 'title' => 'Anguilla', 'native' => ''], |
| function ElzahabyDynamicLaravelString($model,$syntax,$sign=null){ | |
| if (isset($model) && $syntax == null){ | |
| $input = $model::getListFields()['syntax']; | |
| }else { | |
| $input = $syntax; | |
| } | |
| $output = $input; | |
| $regex = '/'.(($sign != null)?$sign:':-:').'[a-z._]+/im'; | |
| if (preg_match_all($regex, $input, $matches, PREG_PATTERN_ORDER)) { |
| www | |
| ftp | |
| localhost | |
| webmail | |
| smtp | |
| pop | |
| ns1 | |
| webdisk | |
| ns2 |
| <?php | |
| /** | |
| * ----------------------------------------------------------------------------------------- | |
| * Based on `https://github.com/mecha-cms/mecha-cms/blob/master/system/kernel/converter.php` | |
| * ----------------------------------------------------------------------------------------- | |
| */ | |
| // HTML Minifier | |
| function minify_html($input) { |
you can find it in this link : https://github.com/el3zahaby/lorem.JS
| <?php | |
| function getImgFromString($html){ | |
| preg_match_all('/<img[^>]+>/i',$html, $result); | |
| $img = array(); | |
| $i = 0; | |
| foreach( $result[0] as $img_tag) | |
| { | |
| preg_match_all('/(src)="([^"]+)"/i',$img_tag, $img[$i]); | |
| $i++; |