Community Patterns

1

ตรวจสอบพยัญชนะต้นตัวสะกดสระและวรรณยุกต์ไทย

Created·2026-01-22 01:36
Updated·2026-01-23 12:42
Flavor·ECMAScript (JavaScript)
ตรวจสอบพยัญชนะต้น (ต้องมี) ตรวจตัวสะกดสำหรับสระที่ต้องมี ตรวจสอบการวางสระและวรรณยุกต์ไทย หมายเหตุ การตรวจสอบตัวสะกดในภาษาไทยตรวจสอบได้ยากเพราะภาษาไทยเป็นภาษาที่เขียนติด ๆ กันไม่มีการแบ่งคำอย่างชัดเจนทำให้การอ่านภาษาไทยผู้อ่านต้องใช้ความหมายของคำในการตัดสินการอ่านแบ่งคำตามความเหมาะสมเช่นคำว่า "ตากลม" อาจอ่านเป็น "ตาก-ลม" ก็ได้ หรืออ่านเป็น "ตา-กลม"ก็ได้ ดังนั้นการเขียน Regex เพื่อทำการตรวจสอบอาจช่วยได้ระดับหนึ่ง อ่าจมีผิดบ้างถูกบ้าง แต่ก็ถือว่าเป็นเครื่องมือที่ใช้ช่วยเหลือในการตรวจสอบเพิ่มเติมได้ 80% ของความเป็นไปใด้ก็แล้วกันนะครับ หวังว่าการเขียนเพิ่มเติมส่วนนี้ จะมีประโยชน์บ้างไม่มากก็น้อย
Submitted by อธิปัตย์ ล้อวงศ์งาม

Community Library Entry

-1

Regular Expression
Created·2019-02-12 21:49
Flavor·PCRE (Legacy)

/
(?<id>[^\|]*)\|(?<action>[^\|]*)\|(?<date_create>[^\|]*)\|(?<actor_type>[^\|]*)\|(?<actor_user_id>[^\|]*)\|(?<actor_user_name>[^\|]*)\|(?<actor_user_email>[^\|]*)\|(?<entity_type>[^\|]*)\|(?<entity_user_id>[^\|]*)\|(?<entity_user_name>[^\|]*)\|(?<entity_user_email>[^\|]*)\|(?<entity_workspace_id>[^\|]*)\|(?<entity_workspace_name>[^\|]*)\|(?<entity_workspace_domain>[^\|]*)\|(?<entity_enterprise_id>[^\|]*)\|(?<entity_enterprise_name>[^\|]*)\|(?<entity_enterprise_domain>[^\|]*)\|(?<entity_channel_id>[^\|]*)\|(?<entity_channel_name>[^\|]*)\|(?<entity_channel_privacy>[^\|]*)\|(?<entity_channel_is_shared>[^\|]*)\|(?<entity_channel_is_org_shared>[^\|]*)\|(?<entity_app_id>[^\|]*)\|(?<entity_app_name>[^\|]*)\|(?<entity_app_is_distributed>[^\|]*)\|(?<entity_app_is_directory_approved>[^\|]*)\|(?<entity_app_scopes>[^\|]*)\|(?<entity_file_id>[^\|]*)\|(?<entity_file_name>[^\|]*)\|(?<entity_file_filetype>[^\|]*)\|(?<entity_file_title>[^\|]*)\|(?<context_type>[^\|]*)\|(?<context_location_id>[^\|]*)\|(?<context_location_name>[^\|]*)\|(?<context_location_type>[^\|]*)\|(?<context_location_domain>[^\|]*)\|(?<context_ua>[^\|]*)\|(?<context_ipaddress>[^\|]*)\|(?<details_name>[^\|]*)\|(?<details_type>[^\|]*)\|(?<details_previous_value>[^\|]*)\|(?<details_new_value>[^\|]*)\|(?<details_export_type>[^\|]*)\|(?<details_export_start_ts>[^\|]*)\|(?<details_export_end_ts>[^\|]*)\|(?<details_is_internal_integration>[^\|]*)\|(?<details_kicker_id>[^\|]*)\|(?<details_kicker_name>[^\|]*)\|(?<details_kicker_email>[^\|]*)\|(?<details_inviter_id>[^\|]*)\|(?<details_inviter_name>[^\|]*)\|?(?<details_inviter_name2>[^\|]*)\|?(?<details_inviter_email>[\w+]*)
/
gm
Open regex in editor

Description

no description available

Submitted by anonymous