Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
ECMAScript (JavaScript)

/
([1-8kqbnrpKQBNRP]{1,8}\/){7}[1-8kqbnrpKQBNRP]{1,8}[\s]{1}[wb]{1}[\s]{1}(([-]{1})|[K?Q?k?q?]{1,4})[\s]{1}([-]{1}|([a-h]{1}[1-8]{1}))[\s]{1}[0-9]+[\s]{1}[0-9]+
/
g

Description

FEN is "Forsyth-Edwards Notation"

Submitted by maxqua72 - 9 years ago