Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

/
(.+)\s(.+)\s\[([a-zA-Z12345\s]+)\]\s\/(.+)\/\n
/
g

Description

Matches the four parts (simplified, traditional, pinyin, definition) of a CEDICT dictionary line

Submitted by Hugh Grigg - 10 years ago