Note: (?<contents>.*? ) -- This is a non-greedy match meaning the .* does not try to match the whole string. The RegexOptions.Si ngleline option treats the input to the Matches function as one long string instead of multiple lines.
Code:
Regex re = new Regex(
"(?<header>[A-Z]{3}.[A-Z]{2}.[0-9]{10}.[0-9]{8})" +
"(?<contents>.*?)" +
"(?<footer>(End of Report|No EDI Activity))",
I think what you want is data binding using objects. (Note this code is using DataGridView for the DataGrids.)
DGData.cs (Data Model Object):
Code:
using System;
using System.ComponentModel;
namespace DataGridTest
{
class DGData
{
private string _name;
public DGData(string name) {
_name = name;
}
public static implicit operator
Leave a comment: