paultraite
Newcomer
- Joined
- Feb 7, 2006
- Messages
- 1
I have an annotated string:
ref class AnnotatedStr
{
public:
String ^str; // the basic char data
// there is one entry in each of the following for each char in str
array<int>^ font;
array<int>^ color;
array<int>^ pointsize;
}
I need to use Regex.Replace() on the string.
ex. Replace( MyAnnotatedString->str, "(?<ugg>[A-Z]{3,6}))",
"Insert1 ${ugg} insert2", MyMatchEvaluator )
Problem -- The inserted text will then be mis-aligned with my annotated arrays of extra data.
1. I didn't see anything to support this in Replace().
2. I thought about deriving from String, and overriding some function there, but didn't find anything promising nor knew what functions Replace() might use that I should override.
Anyone got any clues here?
ref class AnnotatedStr
{
public:
String ^str; // the basic char data
// there is one entry in each of the following for each char in str
array<int>^ font;
array<int>^ color;
array<int>^ pointsize;
}
I need to use Regex.Replace() on the string.
ex. Replace( MyAnnotatedString->str, "(?<ugg>[A-Z]{3,6}))",
"Insert1 ${ugg} insert2", MyMatchEvaluator )
Problem -- The inserted text will then be mis-aligned with my annotated arrays of extra data.
1. I didn't see anything to support this in Replace().
2. I thought about deriving from String, and overriding some function there, but didn't find anything promising nor knew what functions Replace() might use that I should override.
Anyone got any clues here?