Got more questions? Find advice on: ASP | SQL | XML | Windows
in Search
Welcome to RegexAdvice Sign in | Join | Help

Browse by Tags

All Tags » .NET » dotNet
  • Breaking text into parts at keywords

    Dear colleagues, I like to parse a text and split it at specific keywords (e.g. k1 or k2). I'll use it in a .NET application like MatchCollection matches = Regex.Matches (sSrc, sRegEx); but for testing I am using RadSoftware Regex-Designer. My sSrc is something like: "k1 blakblak\r\nblakblak k2 blablabla k1 data3 k2 ...
    Posted to Construction Advice (Forum) by Thomas_ on August 27, 2008
  • RegEx Help - Replacing hrefs

    OK. Stick with me here. It is going to take me a few to explain this. I am writing a small application in VB.NET. The ultimate task is to make a web browser, within a web browser. Basically, You open IE, FireFox, Safari, or whatever browser you like and go to the web application I am building. At the top of the web page, I have a tool bar, ...
    Posted to Construction Advice (Forum) by TampaWebDevelopment on June 27, 2007
  • Re: Length of an Email

    docdawson:  ^(\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*){n,20}$ Doesn't this just match n to 20 e-mail addresses? I understand carlosaml wants addresses with no more than 20 characters. The shortest possible address that will match the pattern above has 5 characters (a@b.c). To check for 5 to 20 characters one would have to use a ...
    Posted to Construction Advice (Forum) by eSquire on May 8, 2007
  • Re: please suggest me the regex for this piece

    This pattern might do what you need.  (?ms)(?<=^(TO|INFO)\s).*?(?=\s+^(?:INFO|GR)\s) It will only work reliably if there are no two other lines starting with TO, INFO or GR in the message body, i.e. after the first GR. It will return one or two matches, depending on the presence of the INFO part.  You will have to split those ...
    Posted to Construction Advice (Forum) by eSquire on May 4, 2007
  • Re: Matching Open/Close HTML tags possible?

    Balancing groups to the rescue! (I hope .NET 1.1 understands those. 2.0 does.) (?xsi) # ignore whitespace for fancy comments, singleline, case insensitive <div\salign=center> # opening tag (This is where you specify your search term) (?>(?:(?!</?div).)*) # not a opening or closing div tag, ...
    Posted to Construction Advice (Forum) by eSquire on May 2, 2007
  • Re: advice for simple SQL where clause expression

    Here you go: (?i)^\[[^\]]+\]\.\[[^\]]+\]\s+(?:LIKE|=|<|>|<>|<=|>=)\s+(?:'[^']*'|\d+)(?:\s+AND\s+\[[^\]]+\]\.\[[^\]]+\]\s+(?:LIKE|=|<|>|<>|<=|>=)\s+(?:'[^']*'|\d+))?\s*$
    Posted to Construction Advice (Forum) by eSquire on May 1, 2007