×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
Hi,
I have the following regular expression:
^(MDB)[\w\W]*(Final.PDF|Final.pdf)$
This expression test as true against the following string:
MDB MO3-09 Final.PDF
at
http://www.regular-expressions.info/javascriptexample.html
I run the same expression and string through the iSeries RegExp APIs and
it fails(returns 1).
Does anyone have any idea where there is a online test that matches the
IBM APIs or can figure out what I am doing incorrectly?
BTW: The OCEAN conference was great!
My program works with another expression to test email addresses.
^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,6}$
Thanks,
Spencer
---snip---
/*---( Compile pattern )---*/
rc = regcomp(&preg, wrkPattern, REG_EXTENDED);
if (rc != 0) {
regerror(rc, &preg, errMsg, sizeof(errMsg));
PatError(100, (char *) pattern, (char *) errMsg);
regfree(&preg);
if (matchString != inpString) {
free((void *) matchString);
matchString = NULL;
}
return (0);
}
/*---( Run Pattern )---*/
if ( (rc = regexec(&preg, matchString, nmatch, pmatch, 0)) != 0 ) {
regerror(rc, &preg, errMsg, sizeof(errMsg));
---snip---
As an Amazon Associate we earn from qualifying purchases.