Reply To: Regular Expressions

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Regular Expressions Reply To: Regular Expressions

#58535
Jamin Gray
Participant

    I may be misunderstanding your question, but if you’re looking for a regular expression that matches all three of the example lines you list, how about this?

    Code:


    regexp — {”d+”,(”[w ,]+”)?,”[w ]+”} $test

    It matches 1 or more digits enclosed in double quotes followed by a comma, followed by an optional string of word characters/spaces/commas enclosed in double quotes followed by a comma, followed by a string of word characters or spaces enclosed in double quotes.  It returns true for all three of the examples you listed.

    -jamin