Tuesday, April 19, 2011

String to Validate only Numbers [Regular Expression is AX 2009]

Following is an Example of Regular Expressions :

static void TextBuffer_regularExpression(Args _args)
    TextBuffer txt = new TextBuffer();
    str msg = "98797897";

    txt.regularExpressions(true);   // activate regular expr in search

     // Regular expression to validate only digits
     if (txt.find("^[0-9]+$"))
        info("string contains only numbers");


No comments:

Post a Comment

Thanks for your time reviewing this blog.