|
Jesal Rana wrote: I want to know the method or any help to change the fonts of website to the different fonts
This question makes no sense whatsoever!
Current blacklist
svmilky - Extremely rude | FeRtoll - Rude personal emails | ironstrike1 - Rude & Obnoxious behaviour
|
|
|
|
|
Hi All,
I am developing a search engine and i m using "." as a seperator of a token..... but now i have to search URLs as well so anyone plz tell me how can i realize that a particular string is a URL.....
looking forward for help
Regards,
|
|
|
|
|
Have a look through regexlib[^] and you'll probably find several ones. Another one is the RegularExpressionValidtorControl in ASP.NET has some built in ones, it may be in there.
You know you're a Land Rover owner when the best route from point A to point B is through the mud.
Ed
|
|
|
|
|
Sir i want to do this using C# and want to know about the RegularExpression class of C#....
any help in this regard will b welcomed
looking forward for help
Regards,
|
|
|
|
|
Rizwan Rathore wrote: want to know about the RegularExpression class of C#
Best place is the documentation provided by MSDN[^]
Ok basically you want the System.Text.RegularExpression namespace, the most important class is RegEx which handles all the matching etc. There is a constructor for this class which takes the regular expression pattern (for the URL in this case) and creates a RegEx object based on it. If you then want to check for URLs you can use:
IsMatch - Checks if a string, or part of the string specified in the parameters matches the regular expression provided in the constructor.Match - Returns a match object which contains the first match that the class found matching the regular expression.Matches - Returns a collection of Match objects for each regular expression matched correctly. If the regular expression is enclosed in parentheses then the url can be extracted by using the Group collection.
Example: This simple code will extract all the urls from a given string.
string urls = "there is a url included somewhere in this string : http://www.codeproject.com/script/comments/forums.asp?msg=1524600&forumid=1649#xx1524600xx and here is another url http://regexlib.com/Search.aspx?k=uri";
string urlRegex = @"(?<url>(mailto\:|(news|(ht|f)tp(s?))\://){1}\S+)";
Regex regex = new Regex(urlRegex);
foreach (Match m in regex.Matches(urls))
{
Console.WriteLine(m.Groups["url"].Value);
}
Console.ReadLine();
You know you're a Land Rover owner when the best route from point A to point B is through the mud.
Ed
|
|
|
|
|
Hi Sir,
thats exactly wat i need but when i tried the program i got this exception
An unhandled exception of type 'System.ArgumentException' occurred in system.dll
Additional information: parsing "(?<url>(mailto\(news|(ht|f)tp(s?))\://){1}\S+)" - Too many )'s.
at this instruction
string urlRegex = @"(?<url>(mailto\(news|(ht|f)tp(s?))\://){1}\S+)";
now i am totally new commer in C# so plzz tell me how can i correct this i am writing the same code which u sent...
so plzz reply back soon
looking forward for help
Regards,
-- modified at 14:30 Friday 9th June, 2006
|
|
|
|
|
Use this regular expression:
(?<url>(mailto\:|(news|(ht|f)tp(s?))\: Rizwan Rathore wrote: so plzz reply back soon
Be warned that some here think this is impolite, I'm not that fussed but others are because we're donating our free time to help you fix your problems.
Rizwan Rathore wrote: looking forward for help
Aren't we all
You know you're a Land Rover owner when the best route from point A to point B is through the mud.
Ed
|
|
|
|
|
Sorry if u mind that i will avoid that in future
but sir i was using exactly same regular expression wich gave exception
so wot shud i do now ??
|
|
|
|
|
The one I gave in the previous reply works fine on my machine, remember to write the string in code as @"regex" rather than "regex" since C# will try and escape the \ characters.
You know you're a Land Rover owner when the best route from point A to point B is through the mud.
Ed
|
|
|
|
|
Hi.
I need a program to sort a mesh array.
At least say me what is mesh array.
Best wishes
|
|
|
|
|
|
Hello!
[modified] Thanx to OrlandoCurioso!
I have tried to use a SendMessage with TVM_GETITEM with a TVITEM struct... but I got no result at all =/
Here is the code(piece):
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
public struct TVITEM
{
public int mask;
public IntPtr hItem;
public int state;
public int stateMask;
[MarshalAs(UnmanagedType.LPStr)]
public string pszText; // string pointer
public int cchTextMax;
public int iImage;
public int iSelectedImage;
public int cChildren;
public IntPtr lParam;
}
StringBuilder sb = new StringBuilder(256);
TVITEM tvItem = new TVITEM();
tvItem.hItem = (IntPtr)Int32.Parse(textBox1.Text);
tvItem.cchTextMax = 256;
tvItem.pszText = sb.ToString();
tvItem.mask = TVIF_TEXT; // TVIF_TEXT = 0x0001;
IntPtr j = SendMessage(TreeHandle, (int)TV_Messages.TVM_GETITEM, (int)0, ref tvItem);
MessageBox.Show(j.ToString());
I´m still having some troubles... I think my only problem now is with the the String Pointer... If I can make it work... I can Retrive my item´s name from the TreeView... and it´s done!
Thanks!
-- modified at 9:27 Friday 9th June, 2006
|
|
|
|
|
You use the TV_INSERTSTRUCT declare.
This is correct:
[StructLayout(LayoutKind.Sequential,
CharSet = CharSet.Auto)]
public struct TVITEM
{
public int mask;
public IntPtr hItem;
public int state;
public int stateMask;
public IntPtr pszText;
public int cchTextMax;
public int iImage;
public int iSelectedImage;
public int cChildren;
public IntPtr lParam;
}
|
|
|
|
|
Thanky you very much!!!!
NExt step: set correctly the values.. send set it to fire!
Best Regards
|
|
|
|
|
Hi All.
İ have to write an SNMP application. That will send SNMP Trap messages to an NMS application. But, i have at least one problem. I don't know an SNMP Trap Message's packet structure. Please help me.
Thanks
Murad from Istanbul
|
|
|
|
|
can anyone help me abt datagrid view
my problme is that im not able to select n deselect checkbxes in gridview like the mailing list in our mail sites
plz help me out
|
|
|
|
|
|
champ_vicks wrote: im not able to select n deselect checkbxes in gridview like the mailing list in our mail sites
Set the ReadOnly property of the Checkboxes to false.
Best Regards.
_____________________________
Success is not something to wait for, its something to work for.
|
|
|
|
|
hi,
iam facing a problem of displaying all the cameras connected to my local system. how can the camera names to be displayed and a particular camera to be selected. pls help me.
|
|
|
|
|
Take a look at DShowNET[^] this is a wrapper around DirectShow and you can enumerate devices using that wrapper, albeit in quite a round-a-bout way.
You know you're a Land Rover owner when the best route from point A to point B is through the mud.
Ed
|
|
|
|
|
hi,
I am creating a setup project in which i want to install mdac and framework to Client machine
Can anybody help me out to do this.
Thanking you,
Dewang Ajmera.
|
|
|
|
|
Hi Dewang,
Guess the following link will help you.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetdep/html/vsredistdeploy1_1.asp
Regards,
Mahen
|
|
|
|
|
hi
i am developing video conferencing project.for this purpose i have to multicast live audio and video streams to all attendee of conference.
i want to send live audio and video streams on two separate sockets .. help me to write its code??
thanks
alwish noor
|
|
|
|
|
Is there any method I can use to jump to a particular row in a datagridview so that that row is highlighted and is displayed as if the 1st row (those rows before it would be scrolled up to be viewed)?
|
|
|
|
|
Tryed all my best but still didn't find any method or way that bring up the specific row in the DataGridView. Well, if you want to select a specific row, you can do it as follows:
<br />
DataGridView1.ClearSelection();<br />
DataGridView1.Rows[index].Selected=true;<br />
where index is an integer variable holding a valid value, or instead of it you can pass an integer value. The ClearSelection method will clear the previous selected row(s).
Best Regards.
_____________________________
Success is not something to wait for, its something to work for.
|
|
|
|