$('#upload-image').on('submit',(function(e) {
e.preventDefault();
var formData = new FormData();
formData.append('image',$('#image')[0].files[0]);
$.ajax({
type:'POST',
url: './modules/image-update-handler.php',
data: formData,
cache:false,
contentType: false,
processData: false,
success:function(data){console.log('success');},
error:function(data){console.log('error');}
});
}));
To use a literal instance of a special character in a regular expression, precede it by two backslash (\) characters. The MySQL parser interprets one of the backslashes, and the regular expression library interprets the other. For example, to match the string 1+2 that contains the special + character, only the last of the following regular expressions is the correct one:mysql> SELECT REGEXP_LIKE('1+2', '1+2'); -> 0 mysql> SELECT REGEXP_LIKE('1+2', '1\+2'); -> 0 mysql> SELECT REGEXP_LIKE('1+2', '1\\+2'); -> 1