|
I found out what I was doing wrong. I need to match the whole string (not only the part I wanted to extract). So I added a named variable called <rest> to match the rest.
This my current version:
<br />
private String stripFromUrl( string url )<br />
{<br />
String stripUrlPattern = "(?<fixedUrl>http:// [ \\w \\. / ]+) (?(/) (?<rest>.+) | (?<rest>(?<=/).+) )";<br />
Regex r = new Regex(stripUrlPattern, RegexOptions.IgnoreCase | RegexOptions.Multiline | RegexOptions.IgnorePatternWhitespace);<br />
string stripurl = r.Replace (url, "${fixedUrl}");<br />
return stripurl;<br />
}<br />
|
|
|
|
|
|
I use System.Uri to get the returned url but it returns the filename and parameters also. I'm Changing relative paths to absolute. That's why I need Regex to strip the filename off the Uri.
|
|
|
|
|
Hi,
Here i am facing one problem in making .exe file,whole situation is like below.
My main project is in C#.net and i had made .dll file from that,now client requirement is that,he wants to run the .exe file of our project from vb 6.0 but that must be console application so i had made .dll file from my project and one another .net project include that .dll and then i made .Exe file of that project which is .net console application,it means that my second project is includes .dll of my project and now for testing purpose i had made third project which include second projects only .exe file but now problem is that third project also required first projects .dll otherwise it is not working.
Here is 3 project's outputs and included files.
first project : out of that made .dll file.
second project : made console application and include first project's .dll file and then made .exe file
Third project (for testing) :if i include only second project's .exe then project is not working and if i include second project's .exe and .dll both
if working fine.
Now my question is that why my third project required .dll of second project,actually third project should not required .dll file ,only .exe of second project is enough.
hope you not confused with all of above.
if any query regarding understanding pls ask me.
|
|
|
|
|
Perhaps a little more punctuation would help?
From what I understood, you have 2 executables and a dll. One of the executables is linked to that dll, the other only uses the first executable. If you are asking why the dll is needed, you haven't understood dynamic linking.
DLL (dynamic linked library) means that linking (resolving method names to addressed) takes place when the executable is loaded into memory. Which obviously means that the dll has to be available when the executable is loaded.
Does this make sense?
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Hi,
I want to cut a mpeg file into parts. I am using MCI from winmm.dll.
I can do play stop, pause , fast forward or slow motion but unable to edit (cut ,copy or paste). could somebody help me? A sample code will help a lot. Thanks in advance.
Ashish
|
|
|
|
|
Well, last time i didn't find the answer for my question - how to create new database file (*.mdb) programmatically, and i try it once again.
And i want to know, if it's possible to enumerate tables in the database? I know it was possible in mysql...
Where can i find all the SQL Statements possible for Access (SQL specification for Access)???
Two last question i posted in the forum... Thank YOU very much for participating... I really appreciate your attention...
|
|
|
|
|
You will need a COM library for that. I think it's called ADOX.
Here's an URL for a VB6 example. Shouldn't be hard to translate it to C#
http://www.freevbcode.com/ShowCode.Asp?ID=803[^]
WM.
What about weapons of mass-construction?
|
|
|
|
|
I plan to create a custom textbox class that when user press the enter key it will focus to another control. But i would like to check out that, should i place the GetNextControl method in the textbox class or in the base form class ? I found that code below not working ..
<br />
public class baseTextBox:System.Windows.Forms.TextBox <br />
{<br />
protected override void OnKeyDown(KeyEventArgs e)<br />
{<br />
if (e.KeyCode == Keys.Enter) <br />
{<br />
Control ctrl = this.GetNextControl(this,true);<br />
ctrl.Focus();<br />
e.Handled = true;<br />
}<br />
}<br />
}<br />
Please advice. Thanks.
|
|
|
|
|
|
Thanks for help.
So i should put the code in a base form class instead of inside the textbox base class right ? Instead of using "this" so what should i use ?
|
|
|
|
|
hi dears,I have created asp.net proeject.i am facing a problem.
I have applied paging on datagrid.I have set page size to 10 record per page.I want to show "ext"on the Left of my Grid and "rev"on the Right of my Grid.Is it possible to do in grid.Give ur comment at my Email address
rahimali_imt@hotmail.com
Thank in Advance
|
|
|
|
|
|
no text
---
b { font-weight: normal; }
|
|
|
|
|
if anyone knows anything about c++ and mysql please try to help me, and go
to:
http://www.codeproject.com/script/comments/forums.asp?forumid=1647&select=1153332
.
there you can find a big problem i have.
please help me sigh: sigh: sigh:
|
|
|
|
|
Hello members,
I need help regarding the above mention topic i.e,serial and parallel port programming in C# or serial to parallel data conversion in C#.
Its urgent.I'll be very thankful for your help.
Nadia Mughal
|
|
|
|
|
I want to call an Event when user press Enter.For example i have two text box.one for username and other is password.i want when my user type user name and password and press enter,i want signin Event to Fire.My code is working when the user press click on sign in button.I want my code to be execute when the user press Enter after typing UserName and password.Plz hepl me dear.Send ur comment at hotmail id
rahimali_imt@hotmail.com
thank in Advance
|
|
|
|
|
Set the form's Accept button property to the "sign in" button. That should do the trick.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Thank for response me.
Actually i have make User Control for the sign in Here, i did not find any property forms Accept Button.Now tell me what to do.Thank in advance
|
|
|
|
|
How to ask questions[^]
Please pay particular attention to the section entitled "Use meaningful, specific subject headers" in addition to why people do not answer public message using private email addresses.
|
|
|
|
|
I want to use Bitmap in one dll. But I can't use System.Drawing in the dll.
Help me please!
|
|
|
|
|
Add a reference to the System.Drawing assembly in your visual studio .NET project.
WM.
What about weapons of mass-construction?
|
|
|
|
|
My problem :
I use a notify icon on a form .. and I want to only show the notify icon and not the form ... but I didn't have any success cause the form tries to open as visible
The only solutions I came up with are
1.to start a timer on form load
2.override the OnVisibleChange method and set visibble always to false
I think the cause for the error is Application.Run( myform ) or probably an error with .NET Framework wich I doubt
Is anybody else experiencing this or I 'm the only one who gets this king of errors .
I tried to set visible false in the constructor but it still shows the form ..
This error comes up in .Net 1.1 , 2.0 Beta2 , haven't tried it on 1.0.. but i'm pretty sure it's the same
If you want to see that I'm write ... create a new C# project ... and in the form constructor write
,.....
this.Visible = false
......
Ok... if someone can tell me why ... or if they have a more viable solution I'll whait for it
Lazar Mihai
Highschool student
|
|
|
|
|
have you tried this.Opacity = 0;
|
|
|
|
|
Unfortunatly this only works in win2k/xp/2k3
WM.
What about weapons of mass-construction?
|
|
|
|