Click here to Skip to main content
15,919,778 members
Home / Discussions / C#
   

C#

 
GeneralDatagrid cell Value Pin
Mr. Naveed Butt9-Aug-05 19:35
professionalMr. Naveed Butt9-Aug-05 19:35 
GeneralView Pin
magnifique9-Aug-05 7:35
magnifique9-Aug-05 7:35 
Generalflexgrid assembly Pin
fady_sayegh9-Aug-05 7:23
fady_sayegh9-Aug-05 7:23 
GeneralRe: flexgrid assembly Pin
Sean Michael Murphy9-Aug-05 14:47
Sean Michael Murphy9-Aug-05 14:47 
Generaladding dll and call its functions Pin
iramg9-Aug-05 7:19
iramg9-Aug-05 7:19 
GeneralRe: adding dll and call its functions Pin
magnifique9-Aug-05 7:28
magnifique9-Aug-05 7:28 
GeneralFlat Database Files Pin
bsohante9-Aug-05 6:50
bsohante9-Aug-05 6:50 
GeneralRe: Flat Database Files Pin
bsohante9-Aug-05 6:54
bsohante9-Aug-05 6:54 
QuestionHow to paint on a browser? Pin
Anonymous9-Aug-05 6:47
Anonymous9-Aug-05 6:47 
GeneralRichTextBox crashing remoting server Pin
NielsHertzum9-Aug-05 5:26
NielsHertzum9-Aug-05 5:26 
GeneralRe: RichTextBox crashing remoting server Pin
mav.northwind9-Aug-05 20:11
mav.northwind9-Aug-05 20:11 
GeneralRe: RichTextBox crashing remoting server Pin
NielsHertzum10-Aug-05 2:33
NielsHertzum10-Aug-05 2:33 
GeneralRe: RichTextBox crashing remoting server Pin
NielsHertzum13-Aug-05 3:15
NielsHertzum13-Aug-05 3:15 
QuestionTry {//code} catch{throw;} ? Pin
Adam °Wimsatt9-Aug-05 5:14
Adam °Wimsatt9-Aug-05 5:14 
AnswerRe: Try {//code} catch{throw;} ? Pin
J4amieC9-Aug-05 5:28
J4amieC9-Aug-05 5:28 
AnswerRe: Try {//code} catch{throw;} ? Pin
LobsterDK9-Aug-05 6:39
LobsterDK9-Aug-05 6:39 
GeneralUnable to programmatically add certificate to certificate store Pin
shubc9-Aug-05 3:56
shubc9-Aug-05 3:56 
Generalpls suggest solution for linking error between pocket pc and printer through infrared(IR) Pin
intractive9-Aug-05 3:39
intractive9-Aug-05 3:39 
GeneralRe: pls suggest solution for linking error between pocket pc and printer through infrared(IR) Pin
Dave Kreskowiak9-Aug-05 5:18
mveDave Kreskowiak9-Aug-05 5:18 
GeneralInstance of Pin
zaboboa9-Aug-05 3:34
zaboboa9-Aug-05 3:34 
GeneralRe: Instance of Pin
J4amieC9-Aug-05 3:52
J4amieC9-Aug-05 3:52 
GeneralRe: Instance of Pin
zaboboa9-Aug-05 4:08
zaboboa9-Aug-05 4:08 
GeneralRegex fun! Pin
Hauxon9-Aug-05 3:01
Hauxon9-Aug-05 3:01 
Hi I'm having a little problem with .NET Regex. I'm using Regex to find included javascript and CSS files in a HTML page and want to put their content directly to my page (because I'm disabling some JS methods for security).

Here's my non working code:
<br />
string html = "content of the webpage";<br />
String jsFilePattern = "(?<firstpart><script\\s* [\\w \\s = \" ' / \\. & ?]+) src=\" (?<jsurl> [\\w \\s = \" ' / \\. & ?]+) [\" '] (?<lastpart> [\\w \\s = \" ' / \\. & ?]+>) ";<br />
Regex r = new Regex(jsFilePattern, RegexOptions.IgnoreCase | RegexOptions.Multiline | RegexOptions.IgnoreWhitespace);<br />
html = rReplace(html, "${firstpart} ${lastpart}" + ReadFromFile("${jsurl}"));


You don't need to debug the pattern for me because I've tested it and it works. My problem is when I call the function ReadFromFile (witch reads data from a file and returns it's contents as a string) from the Regex the content of the parameter ${jsurl} is not put in the function but the parametername instead (${jsurl}. This results in an error from my ReadFromFile funtion. It seems like Regex puts the contents of it's parameters afterwards.

Is there another way to do this?... Can I use my precious Regex pattern somehow to collect the $jsurl parts into an array or something??

Thans for reading this far Smile | :)
Hrannar
GeneralRe: Regex fun! Pin
Guffa9-Aug-05 4:35
Guffa9-Aug-05 4:35 
GeneralRe: Regex fun! Pin
Hauxon9-Aug-05 5:35
Hauxon9-Aug-05 5:35 

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.