Click here to Skip to main content
15,915,093 members
Home / Discussions / C#
   

C#

 
GeneralRe: bitmap speed question [modified] Pin
likefood25-May-06 5:13
likefood25-May-06 5:13 
QuestionSound Control Pin
alias bill24-May-06 12:39
alias bill24-May-06 12:39 
AnswerRe: Sound Control Pin
mav.northwind24-May-06 22:57
mav.northwind24-May-06 22:57 
AnswerRe: Sound Control Pin
Cary Zhang25-May-06 0:33
Cary Zhang25-May-06 0:33 
QuestionMemory friendly way to add to listbox? Pin
Dan Neely24-May-06 10:21
Dan Neely24-May-06 10:21 
AnswerRe: Memory friendly way to add to listbox? Pin
mav.northwind25-May-06 0:20
mav.northwind25-May-06 0:20 
QuestionRegEx Parsing? Pin
econner24-May-06 10:17
econner24-May-06 10:17 
AnswerRe: RegEx Parsing? Pin
Ed.Poore24-May-06 12:36
Ed.Poore24-May-06 12:36 
Yes it is possible to look for the background string with regular expressions, this is exactly what they are designed for. The problems would be with different permutations of the background tag. I can't remember exactly without looking it up but I seem to remember that the attributes aren't specified in any particular order. If they can be in a particular order then it is simpler. But a Regex like the following may work (with expansion):
background\:\w+(#[0-9A-F]{6})\w+url\(([^\)]+)\)\w+(\W+)\w+(\W+)
I'm not sure if this is 100% correct as I'm rebuilding my dev machine at the moment but basically it'll match a background colour (beginning with the background: tag, followed by a # and followed by 6 hex digits), some whitespace, url(any character except a ')'), whitespace, not whitespace, whitespace, not whitespace).

Each of the attributes is assigned a group which can be accessed through the Match object.

As for replacing the values this can be done with the Regex.Replace method.


You know you're a Land Rover owner when the best route from point A to point B is through the mud.

Ed
QuestionSymbol Font question Pin
Wjousts24-May-06 10:05
Wjousts24-May-06 10:05 
AnswerRe: Symbol Font question Pin
Wjousts24-May-06 11:10
Wjousts24-May-06 11:10 
Questiona question about printing or saving data in datagridview ? Pin
cmpeng3424-May-06 10:01
cmpeng3424-May-06 10:01 
AnswerRe: a question about printing or saving data in datagridview ? Pin
maryamf24-May-06 12:26
maryamf24-May-06 12:26 
QuestionComputer names Pin
Elvis_Pretzelator24-May-06 9:30
Elvis_Pretzelator24-May-06 9:30 
AnswerRe: Computer names Pin
Wjousts24-May-06 9:59
Wjousts24-May-06 9:59 
GeneralRe: Computer names Pin
Elvis_Pretzelator24-May-06 13:58
Elvis_Pretzelator24-May-06 13:58 
AnswerRe: Computer names Pin
alexey N24-May-06 17:49
alexey N24-May-06 17:49 
QuestionOrg.Mentalis.Security version for pocket PCs [modified] Pin
msolh24-May-06 9:10
msolh24-May-06 9:10 
Question[VS.NET 2005] where is csc.exe? Pin
Susuko24-May-06 9:03
Susuko24-May-06 9:03 
AnswerRe: [VS.NET 2005] where is csc.exe? Pin
Dustin Metzgar24-May-06 9:10
Dustin Metzgar24-May-06 9:10 
AnswerRe: [VS.NET 2005] where is csc.exe? Pin
mav.northwind24-May-06 23:02
mav.northwind24-May-06 23:02 
QuestionHow to create customize buttons easy? Pin
conemajstor24-May-06 8:47
conemajstor24-May-06 8:47 
QuestionI want to terminate my app. after a specific Pin
mostafa_h24-May-06 8:45
mostafa_h24-May-06 8:45 
QuestionRe: I want to terminate my app. after a specific Pin
Dustin Metzgar24-May-06 9:03
Dustin Metzgar24-May-06 9:03 
AnswerRe: I want to terminate my app. after a specific Pin
MCSD-Gandalf24-May-06 9:11
MCSD-Gandalf24-May-06 9:11 
GeneralRe: I want to terminate my app. after a specific Pin
mostafa_h25-May-06 9:50
mostafa_h25-May-06 9:50 

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.