All pastes #32822 Raw Edit

Stuff

public text v1 · immutable
#32822 ·published 2005-12-07 19:18 UTC
rendered paste body
enum Char { A = 0,B = 1,C = 2,D = 3,E = 4,F = 5,G = 6,H = 6,I = 8,J = 9,K = 10,L = 11,M = 12,N = 12,O = 14,P = 15,Q = 16,R = 17,S = 18,T = 19,U = 20,V = 21,X = 22,Y = 23,Z = 24 };
		enum Type { Object = 0, Pattern = 1, Replace = 2, Description = 3 };


public static string replaceCode(string strScan)
		{

			CHighligt[,] strArrIdent = new CHighligt[25, 4];
			
			// pos 0,* = A, pos 1,* = B , pos 2,* = C etc etc etc
			strArrIdent[Char.A, Type.Object] = new CHighligt();
			strArrIdent[Char.A, Type.Pattern].Pattern = @"(.*?)(\d)(.*?)";
			strArrIdent[Char.A, Type.Replace].Replace = @"$1<font color=darkred>$2</font>$3";
			strArrIdent[Char.A, Type.Description].Description = "Replaces all digits";
                }