using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"Your property ref: 64206_([^\s]+) .* Message: (.*) Thanks Postcode:";
string input = @"Overseas enquiry from Jacqueline Surname via Zoopla Property Group Overseas enquiry from Jacqueline Surname via Zoopla Property Group You have a new enquiry provided by Zoopla Property Group Don't miss a lead! Add this email address to your address book members@zpg.co.uk Zoopla Property Group Zoopla Property Group Buyer enquiry To view all your leads login to ZooplaPro today. *Dear team at Algarve Team Properties Lda*, You have a new Overseas enquiry Name: Jacqueline Surname Telephone: 000000 761232 Email: email@gmail.com About: I am looking to invest Type of enquiry: Request property details Unique Reference: listing_53927960_64206 Your property ref: 64206_ATP350A1 Address: Albufeira, Algarve, Portugal Message: What are the condominium fees for this property please? Thanks Postcode: PO6 2UJ 1 bed property for sale *€110,000 * - _1 bed property for sale_ Albufeira, Algarve, Portugal Clube Albufeira Resort Lovely 1st floor T1 apartment, in a superb area in one of Albufeira’s premier complexes, just outside the lively ... _View more details_";
Match m = Regex.Match(input, pattern);
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