Summary

This command returns true if parameter matches the regular expression specified by the ‘pattern’ attribute.


Attributes

  • pattern (required)
  • merge (optional)
  • default (optional)

Parameters

  • one string command

Example

<script scriptId="validateDate">
    <body>
        <s:alert>
            <s:expression>
            
                <s:regex pattern="[0-3][0-9]-[A-Za-z]{3}-[2][0][0-9][0-9]">
                    <s:stringPath path=":value"/>
                </s:regex>
                
            </s:expression>
            <s:correction>
                <s:string value="required"/>
            </s:correction>
            <s:text>
                <s:string value="Value entered must be a date (dd-MMM-yyyy). 
                Please correct."/>
            </s:text>
        </s:alert>
    </body>
    <target typeId="Insert" action="update" when="preprocess" shouldReconcile='true'/>
    <target typeId="Questions" action="update" when="preprocess" shouldReconcile='true'/>
    <target typeId="Here"  action="update" when="preprocess" shouldReconcile='true'/>
</script>



Need more help?

Please visit the Fountayn Contact Information page.