{
set
{
- if(value != (compileFlags & REG_ICASE))
+ if(value != ((compileFlags & REG_ICASE) != 0))
{
- compileFlags = value ? compileFlags | REG_ICASE : compileFlags & ~REG_ICASE;
+ value ? (compileFlags |= REG_ICASE) : (compileFlags &= ~REG_ICASE);
if(regex)
Compile();
}
{
set
{
- if(value != (compileFlags & REG_NEWLINE))
- compileFlags = value ? compileFlags | REG_NEWLINE : compileFlags & ~REG_NEWLINE;
- if(regex)
- Compile();
+ //if(value != ((compileFlags & REG_NEWLINE) != 0))
+ if(value != ((compileFlags & REG_EXTENDED)))
+ {
+ value ? (compileFlags |= REG_NEWLINE) : (compileFlags &= ~REG_NEWLINE);
+ if(regex)
+ Compile();
+ }
}
get { return (compileFlags & REG_NEWLINE) != 0; }
}
{
set
{
- if(value != (executeFlags & REG_NOTBOL))
- executeFlags = value ? executeFlags | REG_NOTBOL : executeFlags & ~REG_NOTBOL;
+ if(value != ((executeFlags & REG_NOTBOL) != 0))
+ value ? (executeFlags |= REG_NOTBOL) : (executeFlags &= ~REG_NOTBOL);
}
get { return (executeFlags & REG_NOTBOL) != 0; }
}
{
set
{
- if(value != (executeFlags & REG_NOTEOL))
- executeFlags = value ? executeFlags | REG_NOTEOL : executeFlags & ~REG_NOTEOL;
+ if(value != ((executeFlags & REG_NOTEOL) != 0))
+ value ? (executeFlags |= executeFlags | REG_NOTEOL) : (executeFlags &= ~REG_NOTEOL);
}
get { return (executeFlags & REG_NOTEOL) != 0; }
}
{
set
{
- if(value != (compileFlags & REG_EXTENDED))
+ if(value != ((compileFlags & REG_EXTENDED) != 0))
{
- compileFlags = value ? compileFlags | REG_EXTENDED : compileFlags & ~REG_EXTENDED;
+ value ? (compileFlags |= REG_EXTENDED) : (compileFlags &= ~REG_EXTENDED);
if(regex)
Compile();
}
property int matchCount { get { return matchCount; } }
- char * Match(String string)
+ char * Match(const String string)
{
if(valid)
{
}
if(c == maxMatchCount)
matchCount = maxMatchCount;
- return string + matches[0].rm_so;
+ return (char *)string + matches[0].rm_so;
}
else
matchCount = 0;