Jump to content
Xtreme .Net Talk

Richard Crist

Avatar/Signature
  • Posts

    97
  • Joined

  • Last visited

About Richard Crist

  • Birthday 10/20/1964

Personal Information

  • Occupation
    Senior Developer
  • Visual Studio .NET Version
    Visual Studio .NET 2003 Professional
  • .NET Preferred Language
    C#

Richard Crist's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. mark007, As I mentioned in my reply to marble_eater, I think that I will also have to use your keypress idea as I will not only be displaying static text, but editable text in addition. Your ideas of control switching may come in handy. I will experiment and get back. Thank you! :)
  2. I've searched the forum but can't seem to find information about textbox character wrapping. I need to be able to have a textbox control that character wraps instead of word wraps. That is, when the textbox displays the text it wraps the text on a character boundary, not a word boundary. I must display EDI X12 data at work and word wrapping can be very misleading. I've found precious little on the web (either MSDN or Google) about .NET textbox character wrapping. Can someone point me in the right direction if I need to code a custom inheritable textbox control to do this? I'm not yet hip to the base methods I would need to mess with, maybe paint or draw or display or something? Surely someone else has wanted or needed to characater wrap instead of word wrap a text box. :eek: Thank you for any and all help! :)
  3. Nobody touch nobody Uhm....hey marble_eater.....check out my portion of the post in the top thread of this post. :)
  4. You guys are out of control LOL :D This forum has some of the best funny moments. I'm sorry I didn't check out the random thoughts earlier. :)
  5. Wow Wow....this is a really cool question, and since no one has commented on it yet I'll take a stab at. Perhaps my answers or others that reply will help out the regex community, because I think this is a good application of regex's. Setup: * Application needs to decide what to do with a file based on file extension * Lots of different file extensions being encountered * Some are fixed and most others fit some pattern, e.g., *.R* for RAR files * Very cumbersome to try and handle each possible extension individually My comments: * I'll assume (and you know what that does) that using patterns will greatly reduce the number of extension entries to be tracked. For example, the pattern \.R[0-9]0-9]$ matches all file extensions .R00 through .R99, reducing the count for that file extension tracking from 100 entries to 1 entry. * Based on that assumption I believe that you will be able to negate the need for a hash table or use the hash table more judiciously. Perhaps you could store fixed extensions in the hash table. By fixed I mean ".avi", ".txt", etc. You could check the extension against the hash table and if found then you're done. If you don't find the extension in the hash table, then you can start comparing it against a sequential list of regex patterns. * This is where it gets subjective. The list of regex patterns probably won't be that big, but even if it is you will most likely still want to go through all the entries. Since a given extension has the potential to match more than one extension pattern, you may have to come up with a resolution method. You might want to check the extension against all extension patterns, and if more than one match is found then do some more extensive extension analysis (no pun intended). * At this point in the discussion there is room for thinking about potentially how many different regex patterns you might handle. If it's a lot, then you might want to hash the patterns into a seperate table, based on the first character of the extension. This and other considerations will have to be made upon analysis of the actual application environment currently and/or as it progresses. That's my ideas. I'm sure that others have suggestions that can help us all think and learn more. :) Regular Expression Documentation
  6. I'm not happy I finally found the answer in the Visual Studio documentation - and I'm not happy. In their infinite wisdom they have decided to use the Communist approach and assume that everyone should edit the same way. See help information below:
  7. Ah, man Well....I checked out the thingy and it's an entry in the registry notifying VS .NET about additional file types. I've posted a new reply at the top level about information I FINALLY found in the VS .NET help (probably via the MSDN library). Thanks for trying on my behalf, though. :)
  8. Rofl You guys are insane!!! You just made my morning! :D
  9. Thank you and stuff You are the man. :cool: I have downloaded the VS .NET 2003 file. I will edit it and see what it does and see if I can use the technique to create my own syntax stuff. Thanks again! :)
  10. Why can't I just get on with things? I'm always wanting to do esoteric things that sometimes lead to coolness, other times lead to usefulness, and sometimes just lead to embarassment. :o I'm still waiting on someone to stumble on a way to make personal syntax lists in the VS .NET editor. If someone found a way I would say "Thank you" and stuff. :)
  11. Regex!! Yes, if you have a string and you want to check each word then you would have to parse the words out to check them. And to determine vowel frequency maybe we could check the values in the Scrabble game? :p I appreciate everyone's posts in this regex forum. I have learned a lot about .NET regex while trying to find answers to questions posted. :)
  12. .NET to the rescue!? seve7_wa's response got me to thinking. I investigated the .NET regex documentation. I came up with the following one line piece of code below that (I think) does what you want: bool vowel_check = Regex.IsMatch(input_string, "a") && Regex.IsMatch(input_string, "e") && Regex.IsMatch(input_string, "i") && Regex.IsMatch(input_string, "o") && Regex.IsMatch(input_string, "u") The above statement (in C#, modify for your language of choice) will return true only if all the vowels are found in the input_string. It takes the five IsMatch boolean return values and "ands" them together. Only if all are true will the result be true. Try it out and let us know how it works. :)
  13. Example(s)
  14. If I understand If I understand your goal correctly: * you have a list of words to be highlighted * for each word in the list you will search for the word in another text area that contains no HTML attributes to start with * each time you find a word you want to highlight it with <b></b> If this is correct then I propose the following: For a given word "testword" search for ([^>])(testword)([^<]) replace with \1<b>\2\</b>\3 This says find "testword" where it does not have a ">" before and does not have a "<" after (meaning it is not surrounded by an HTML attribute), using parentheses to refer back to the search result in an ordinal manner. Then replace the found text, inserting the bold start and bold end HTML attribute at the proper positions. Doing this for each word in the word list will work ok because as you search you are ignoring any candidate results that already have HTML around them. I hope that I understand your question and that this answer helps in some way. :)
×
×
  • Create New...