|
If its a string then you can use replace command.
1. Replace \\ with \
2. Replace \" with "
i hope it will work in most of the cases.
|
|
|
|
|
Thanks for the reply.
aaCog wrote: 1. Replace \\ with \
The question is how should I represent
\\ in
string.replace("\\", '\' )
without escape sequence? Same thing with \"
|
|
|
|
|
LiYS wrote: string.replace("\\", '\' )
it wont work, either both params are type of string or char. No way for one string and another char
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
string saves \ as \\, so I dont think you can change it in a string variable however if you gonna write in text file or displaying in textbox or anyother control then you can try with string.Replace("\\\\", "\\")
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Xmen wrote: string.Replace("\\\\", "\\")
That's another approach I've tried with no luck. The .replace() seems don't take \\\\ as \\
|
|
|
|
|
It would be nice if you explain your main requirement
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
It's a string inside of tag. The \\ in file path made it failed to locate the .jpg file.
|
|
|
|
|
like this ? code
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Xmen wrote: like this ? code
Exactly!
|
|
|
|
|
Its hard to tell, because I dont know how you setting this path in src Attribute...
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Xmen wrote: Its hard to tell, because I dont know how you setting this path in src Attribute...
Like this:
imageNode.SetAttributeValue("src", strpath);
where "strpath" is "C:\Documents and Settings\Administrator\Local Settings\Temp\image0.jpg"
|
|
|
|
|
try this
imageNode = document.createElement('img');
imageNode.src = strpath;
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
i dunno what your application is doing,
but try using "/" instead of "\".
See if it works.
|
|
|
|
|
Perhaps try in your declaration using the @ char before the string ? e.g.
string _fileUrl = @"C:\\Documents and Settings\\Administrator\\Local Settings\\Temp\\image0.jpg\";
|
|
|
|
|
I have a datagridview including columns: MedicineName, Contry, Quantity, .., Total.
When I want to type a word ( ex: "B" ) into a cell of MedicineName column then appearing a list conntaint: "B1","B2","B6" ( note that "B1 B2 B6 " exist in list) then it allow to choose a item from the list. The list is disappeared and also that all has value which chosen.
Thank you very much!!
|
|
|
|
|
My input is
Deep Well, landscape [1,1]
and I need to parse at the comma so I will have "deep well" as 'WellType' and then after the space so that "landscape" will be 'WellOrientation'. Sounds easy. The catch is sometimes 'WellType' will have a space, and other times it will not. Also, Orientation can be all kinds of things not just landscape. And the [1,1] is fine no issues with that.
My current expression is
(?'WellType'[^,]*)\s(?'WellOrientation'[^\s])
And this my output is:
WellType: Deep
WellOrientation: W
Now Im pretty sure i know the problem, which is a first for me. [^,]* is saying keep going until you reach a comma, but then i have \s, which says stop at the space. Because the input has both a comma and a space im getting this output.
any ideas on how to get this working?
|
|
|
|
|
How about this:
(?'WellType'[^,]*),\s(?'WellOrientation'[^\s]*)
^ ^
|
|
|
|
|
|
|
(?'WellType'\w*),\s(?'WellOrientation'\w)
should also work
a programmer traped in a thugs body
|
|
|
|
|
No, it doesn't, because of the whitespace. You also left off the second asterisk.
But "(?'WellType'.*),\s(?'WellOrientation'.*)" does.
|
|
|
|
|
Hello,
I have written a C# console-application that depends on a number of environment variables. These variables are set in a *.bat file.
I would like to run that file and have the variables set in my application's environment.
Unfortunatly that doesn't work, a least not by using System.Diagnostics.Process.
Am I missing something? Any Idea?
Thanks for any help.
|
|
|
|
|
Try using the System.Environment class. It has several static methods that should help solve your problem.
|
|
|
|
|
I know System.Environment.
It allows me (among other things) to set and retrieve enviroment variables.
But I need to use the *.bat file because it is not under my control and I don't otherwise know the values it will set.
|
|
|
|
|
Won't the BAT file run in its own process and only affect that process?
|
|
|
|