How to manipulate ISegmentPair.Source text?

Hi,

I want to perform Regex replacements on source segments of .sdlxliff files.

I have implemented a bare-bone I BilingualContent Processor and am now stuck as how to manipulate

IsegmentPair.Source text. How do I do that?

        public void ProcessParagraphUnit(IParagraphUnit paragraphUnit)
        {

            if (paragraphUnit.IsStructure == false)
            {

                foreach (ISegmentPair segmentPair in paragraphUnit.SegmentPairs)
                {
                    
                    // MessageBox.Show(segmentPair.Source.ToString());
                    // How do I manipulate segmentPair.Source text?
                }
            }
        }