using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"#\d+[(=](\w+)\((.*?)\)[;A-Z]";
string input = @"#14(REPRESENTATION_RELATIONSHIP($,$,#293,#291)REPRESENTATION_RELATIONSHIP_WITH_TRANSFORMATION(#12)SHAPE_REPRESENTATION_RELATIONSHIP());
#35=MECHANICAL_DESIGN_GEOMETRIC_PRESENTATION_REPRESENTATION('',#180,888.125521);
#25=ADVANCED_BREP_SHAPE_REPRESENTATION('',(#29),#277);
#186=AXIS2_PLACEMENT_3D('',#270,#230,#231);";
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