using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"\s*<GetFulfillmentPreviewResponse[\s\S]*?>[\s\S]*?<GetFulfillmentPreviewResult[\s\S]*?>[\s\S]*?<FulfillmentPreviews[\s\S]*?<EstimatedFees[\s\S]*?<Value>([\s\S]*?)<\/Value>";
string input = @"<GetFulfillmentPreviewResponse xmlns=""http://mws.amazonaws.com/FulfillmentOutboundShipment/2010-10-01/"">
<GetFulfillmentPreviewResult>
<FulfillmentPreviews>
<member>
<MarketplaceId>ATVPDKIKX0DER</MarketplaceId>
<IsCODCapable>false</IsCODCapable>
<IsFulfillable>true</IsFulfillable>
<ShippingSpeedCategory>Standard</ShippingSpeedCategory>
<UnfulfillablePreviewItems/>
<EstimatedShippingWeight>
<Value>4</Value>
<Unit>POUNDS</Unit>
</EstimatedShippingWeight>
<EstimatedFees>
<member>
<Name>FBAPerUnitFulfillmentFee</Name>
<Amount>
<CurrencyCode>USD</CurrencyCode>
<Value>6.73</Value>
</Amount>
</member>
</EstimatedFees>
<FulfillmentPreviewShipments>
<member>
<LatestShipDate>2019-02-02T07:59:59Z</LatestShipDate>
<LatestArrivalDate>2019-02-05T07:59:59Z</LatestArrivalDate>
<FulfillmentPreviewItems>
<member>
<ShippingWeightCalculationMethod>Dimensional</ShippingWeightCalculationMethod>
<SellerFulfillmentOrderItemId>001test</SellerFulfillmentOrderItemId>
<EstimatedShippingWeight>
<Value>3.228</Value>
<Unit>POUNDS</Unit>
</EstimatedShippingWeight>
<Quantity>1</Quantity>
<SellerSKU>ASICS by Rakuten_20180926_29.86_6799</SellerSKU>
</member>
</FulfillmentPreviewItems>
<EarliestArrivalDate>2019-02-04T08:00:00Z</EarliestArrivalDate>
<EarliestShipDate>2019-01-29T08:00:00Z</EarliestShipDate>
</member>
</FulfillmentPreviewShipments>
</member>
</FulfillmentPreviews>
</GetFulfillmentPreviewResult>
<ResponseMetadata>
<RequestId>8a6d2844-317a-4bc7-9183-e405128203d9</RequestId>
</ResponseMetadata>
</GetFulfillmentPreviewResponse>
";
RegexOptions options = RegexOptions.Multiline;
foreach (Match m in Regex.Matches(input, pattern, options))
{
Console.WriteLine("'{0}' found at index {1}.", m.Value, m.Index);
}
}
}
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for C#, please visit: https://msdn.microsoft.com/en-us/library/system.text.regularexpressions.regex(v=vs.110).aspx