- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
var preg_match = function(pattern, subject) {
var result; // Result data
var request = $.ajax({ // Send request
type: "POST",
url: "/api/regexp.php",
async: false,
// dataType: "json",
data: {p: pattern, s: subject}
});
request.done(function(data){ // Case no errors occured
result = data;
});
return (result == 1) ? true : false;
}