Click here to Skip to main content
16,005,178 members
Home / Discussions / C#
   

C#

 
GeneralRe: Drawing outside of your Form!! Pin
benjymous4-Oct-04 2:07
benjymous4-Oct-04 2:07 
GeneralPassing databaseName to crystal report Pin
amgad_fathy3-Oct-04 8:52
amgad_fathy3-Oct-04 8:52 
GeneralRe: Passing databaseName to crystal report Pin
Heath Stewart3-Oct-04 9:18
protectorHeath Stewart3-Oct-04 9:18 
GeneralDataBinder.Eval: 'System.Data.Common.DbDataRecord' does not contain a property with the name REPORTTO Pin
macsgirl3-Oct-04 8:45
macsgirl3-Oct-04 8:45 
GeneralRe: DataBinder.Eval: 'System.Data.Common.DbDataRecord' does not contain a property with the name REPORTTO Pin
Heath Stewart3-Oct-04 9:14
protectorHeath Stewart3-Oct-04 9:14 
GeneralAvoiding Win32 dependancy Pin
Andres Coder3-Oct-04 6:03
Andres Coder3-Oct-04 6:03 
GeneralRe: Avoiding Win32 dependancy Pin
Heath Stewart3-Oct-04 9:13
protectorHeath Stewart3-Oct-04 9:13 
Generalregex question Pin
g00fyman3-Oct-04 3:13
g00fyman3-Oct-04 3:13 
hey to all,

i am trying to parse a source file to determine the class name from its signature using regex

i can get it as long as the file doesnt include anything after the '{' in the signature,

can anyone offer help pls?

[code]
Regex regex = new Regex(@"(?<=\bclass\s+\b)\w+(?=\s*\{)");

this works fine for examples like:

// this is class file

public class Tester
{

}

internal class InternalTester{

}

// output misses commented 'class' keyword, this is good Smile | :)
[/code]

but if i have say a java example or if i extend a class it fails

like:

[code]
public class Form1 : System.Windows.Forms.Form
{
}

// or java

public class Listener extends Thread
{


[/code]

also i would like to be able to change the keyword it is trying to find with something this (which is wrong)

[code]
static string KEYWORD = "class";

Regex regex = new Regex(@"(?<=\b" + KEYWORD + "\s+\b)\w+(?=\s*\{)");
[/code]

any suggestions pls ?

kind regards

maurice
GeneralRe: regex question Pin
Not Active3-Oct-04 5:20
mentorNot Active3-Oct-04 5:20 
Generalcharacter escaping problem Pin
sween33-Oct-04 3:10
sween33-Oct-04 3:10 
GeneralRe: character escaping problem Pin
Stefan Troschuetz3-Oct-04 3:57
Stefan Troschuetz3-Oct-04 3:57 
GeneralRe: character escaping problem Pin
sween24-Oct-04 2:25
sween24-Oct-04 2:25 
GeneralRequest a new login Pin
quilkin3-Oct-04 2:25
quilkin3-Oct-04 2:25 
GeneralRe: Request a new login Pin
Dave Kreskowiak4-Oct-04 7:12
mveDave Kreskowiak4-Oct-04 7:12 
GeneralRe: Request a new login Pin
quilkin4-Oct-04 7:42
quilkin4-Oct-04 7:42 
GeneralRe: Request a new login Pin
Anonymous4-Oct-04 8:13
Anonymous4-Oct-04 8:13 
GeneralRe: Request a new login Pin
Anonymous4-Oct-04 11:17
Anonymous4-Oct-04 11:17 
Questionwindows forms repeater? Pin
Roger Alsing2-Oct-04 23:52
Roger Alsing2-Oct-04 23:52 
GeneralNeed help coding a basic C# program Pin
Member 13850492-Oct-04 22:08
Member 13850492-Oct-04 22:08 
GeneralRe: Need help coding a basic C# program Pin
Stefan Troschuetz2-Oct-04 23:44
Stefan Troschuetz2-Oct-04 23:44 
GeneralAdding Application on windows start up Pin
Zapss2-Oct-04 18:30
Zapss2-Oct-04 18:30 
GeneralRe: Adding Application on windows start up Pin
Nnamdi Onyeyiri3-Oct-04 0:04
Nnamdi Onyeyiri3-Oct-04 0:04 
GeneralRe: Adding Application on windows start up Pin
Zapss3-Oct-04 21:16
Zapss3-Oct-04 21:16 
GeneralRe: Adding Application on windows start up Pin
Nnamdi Onyeyiri4-Oct-04 1:30
Nnamdi Onyeyiri4-Oct-04 1:30 
GeneralRe: Adding Application on windows start up Pin
Member 12723814-Oct-04 19:17
Member 12723814-Oct-04 19:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.