|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
C# Newbie help with regexp and files.
My company let go all the people with skill, and then dumped some 'simple' work on me, Only I have never done c#. I was the PC Tech.
I need to scan through a file and return the characters after a keyword, and before a paren. ex: keyword whatINeed( I would need to return WhatINeed. in the file there will be many matches to the key word, and WhatINeed will be different most of the time. I suspect I can use System.Text.RegularExpressions with the stream, but I'm not sure. |
|
#2
|
|||
|
|||
|
so far
I am working with this string for this example:
keyword WhatINeed_A(foo, bar);keyword WhatINeed_B(foo, bar); I have tried @"keyword.*\(" but this returns: keyword WhatINeed_A(foo, bar);keyword WhatINeed_B( I really just need: WhatINeed_A WhatINeed_B However, if the close as I can get is: keyword WhatINeed_A( keyword WhatINeed_B( I could work wth that. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > .NET Development > C# Newbie help with regexp and files. |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|