Skip to content

Instantly share code, notes, and snippets.

@tigercosmos
Created May 21, 2018 13:17
Show Gist options
  • Save tigercosmos/41902f9f46b224dc7d8d772508b062a0 to your computer and use it in GitHub Desktop.
Save tigercosmos/41902f9f46b224dc7d8d772508b062a0 to your computer and use it in GitHub Desktop.
var PATTERN = new RegExp(
'(而家|立(?:刻|即)|即刻)|' +
'(今|明|前|大前|後|大後|聽|昨|尋|琴)(早|朝|晚)|' +
'(上(?:午|晝)|朝(?:早)|早(?:上)|下(?:午|晝)|晏(?:晝)|晚(?:上)|夜(?:晚)?|中(?:午)|凌(?:晨))|' +
'(今|明|前|大前|後|大後|聽|昨|尋|琴)(?:日|天)' +
'(?:[\\s|,|,]*)' +
'(?:(上(?:午|晝)|朝(?:早)|早(?:上)|下(?:午|晝)|晏(?:晝)|晚(?:上)|夜(?:晚)?|中(?:午)|凌(?:晨)))?', 'i');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment