Advertisement
Guest User

Regex and Sample lines

a guest
May 15th, 2019
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.31 KB | None | 0 0
  1. ^2019.*?(?:\"INSERT\"|\"UPDATE\"|\"DELETE\").*?(:?((\R +|\t+).*?)*)$
  2.  
  3.  
  4. Example (every line/block except the first and last one gets marked, but only the non-indented lines get marked)
  5.  
  6. 2019-05-15 16:09:28.335 UTC,"moodle","sb_moodle",27233,"::1:43344",5cdc39b8.6a61,36,"SELECT",2019-05-15 16:09:28 UTC,3/1165,0,LOG,00000,"execute <unnamed>: SELECT 'x' FROM mdl_quiz_attempts WHERE userid = $1 AND quiz = $2 LIMIT 1","parameters: $1 = '2', $2 = '1'",,,,,,,,""
  7. 2019-05-15 16:09:28.427 UTC,"moodle","sb_moodle",27233,"::1:43344",5cdc39b8.6a61,31,"DELETE",2019-05-15 16:09:28 UTC,3/1160,0,LOG,00000,"execute <unnamed>: DELETE FROM mdl_question_attempt_step_data WHERE attemptstepid IN (
  8. SELECT qas.id
  9. FROM mdl_question_attempts qa
  10. JOIN mdl_question_attempt_steps qas ON qas.questionattemptid = qa.id
  11. WHERE qa.questionusageid = $1)","parameters: $1 = '191'",,,,,,,,""
  12. 2019-05-15 16:09:28.429 UTC,"moodle","sb_moodle",27233,"::1:43344",5cdc39b8.6a61,32,"DELETE",2019-05-15 16:09:28 UTC,3/1161,0,LOG,00000,"execute <unnamed>: DELETE FROM mdl_question_attempt_steps WHERE questionattemptid IN (
  13. SELECT qa.id
  14. FROM mdl_question_attempts qa
  15. WHERE qa.questionusageid = $1)","parameters: $1 = '191'",,,,,,,,""
  16. 2019-05-15 16:09:28.431 UTC,"moodle","sb_moodle",27233,"::1:43344",5cdc39b8.6a61,33,"DELETE",2019-05-15 16:09:28 UTC,3/1162,0,LOG,00000,"execute <unnamed>: DELETE FROM mdl_question_attempts WHERE mdl_question_attempts.questionusageid = $1","parameters: $1 = '191'",,,,,,,,""
  17. 2019-05-15 16:09:28.432 UTC,"moodle","sb_moodle",27233,"::1:43344",5cdc39b8.6a61,34,"DELETE",2019-05-15 16:09:28 UTC,3/1163,0,LOG,00000,"execute <unnamed>: DELETE FROM mdl_question_usages WHERE mdl_question_usages.id = $1","parameters: $1 = '191'",,,,,,,,""
  18. 2019-05-15 16:09:28.433 UTC,"moodle","sb_moodle",27233,"::1:43344",5cdc39b8.6a61,35,"DELETE",2019-05-15 16:09:28 UTC,3/1164,0,LOG,00000,"execute <unnamed>: DELETE FROM mdl_quiz_attempts WHERE id = $1","parameters: $1 = '32'",,,,,,,,""
  19. 2019-05-15 16:09:28.435 UTC,"moodle","sb_moodle",27233,"::1:43344",5cdc39b8.6a61,36,"SELECT",2019-05-15 16:09:28 UTC,3/1165,0,LOG,00000,"execute <unnamed>: SELECT 'x' FROM mdl_quiz_attempts WHERE userid = $1 AND quiz = $2 LIMIT 1","parameters: $1 = '2', $2 = '2'",,,,,,,,""
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement