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 » regex
Showing page 1 of 2 (14 total posts)
  • Re: No script tag in html

    If I use.NET and my regex and yours works   <script [^>] *> [\w|\t|\r|\W] *? </script>   <script [^>] *> ([\w\W] *?) </script> For example we have the it paginates following web:   <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" ...
    Posted to Discussion (Forum) by bellinux on November 16, 2008
  • How to replace multiple matched patterns with multiple patterns?

    Hi,  Let me explain the scenerio: I have the input text "Mr. XYZ is a very nice person and have a very good taste of humor" I want to write one replace string and once pattern string such that I can do the following things: er -> gh av -> th these are two papperts that I can match with the pattern string ...
    Posted to Construction Advice (Forum) by princeoo7 on November 10, 2008
  • Ignoring C style comments

    Hi, I am new to C# and really stuck on this one. I need to serach for a pattern in code, but I want to ignore whatever is present within comments (/*...comment...*/ or //...comment..). This is my RegEx code (which obviously is not working :()Regex matchpow = new Regex("(pow.*\\s*.*\\s*.*;) (?!\\s*/\\*.*\\s*\\*/)"); matchpow = new ...
    Posted to Discussion (Forum) by anushreegautam on September 25, 2008
  • Need a regex

    I need a regex which accepts any alphanumeric including special characters like #$%^&!@ etc. It should not accept all numbers or all spl characters ie. 123456 is not valid. #&#^$^#$ is not valid. But 1234abcd is valid. 1238derdfj%df is valid. abdice#$% is valid.
    Posted to Discussion (Forum) by sandawn on September 22, 2008
  • Need regex to omit <followedby> or white spaces

    I am looking for a regular expression which should match the following criteria 1. Input string should not contain <followed by> 2. Input string should not contain white spaces. Below are the examples for which regex should return true/false (Regex.IsMatch(inputString)) some<testhaspattern>thing - false s&*<te*&#df> - ...
    Posted to Discussion (Forum) by bvsuresh_reddy on April 1, 2008
  • Need a regular expression for validating email which should exclude /|\;,<> and spaces

    Hi I need a regular expression for email validation, it should excldue the email addresses with the following special characters.  \|/,;<> and spaces. The rule for validating the email is : Email address must contain a single @, one or more periods, and any standard characters with the exception of spaces and the ...
    Posted to Construction Advice (Forum) by bvsuresh_reddy on March 19, 2008
  • Numeric Validation

    HI I am new to regular expressions BUT I am trying to create a regex that will validate numeric input where the number can be zero (0), positive (123), negative (-123), a decimal positive(123.123), a decimal negative (-123.123) but the decimal could be up to 8 places (123.12345678)  There are lots of examples that do part of what I ...
    Posted to Discussion (Forum) by jamesgileslang on January 28, 2008
  • .NET VB New Sub Replace Help? Not Quite Right

    Hi Guys,  I am trying to generate some dynamic code. and need to replace the Public Sub New in vb.net Multiline and Case ignore is on and i am using .net regex engine. (PUBLIC|PRIVATE)\s+(SUB)\s+NEW([.\n]*|(END\s+SUB|END\s+FUNCTION)) I Needs To Match Public Sub New()      *(With Or Without Brackets) - (Can be ...
    Posted to Discussion (Forum) by Beachnerd on January 28, 2008
  • How to accept certain symbols and reject others

    I'm trying to create a regex that has the following requirements: 1. must be at least 7 characters in length 2. must contain at least 1 digit 3. must contain at least 1 lowercase letter 4. must contain at least 1 uppercase letter 5. must contain at least one of the following symbols: = ! $ % ^ & + 6. It must reject any word that ...
    Posted to Construction Advice (Forum) by RobertH on November 13, 2007
  • Complex Name Matching Assistance

    I wrote a VB.NET application that parses airline passenger data using Regular Expressions.  The passenger's last name appears first followed by a slash.  There can be many different data items after that.  In the airline data, the passenger name format is: [] = optional -[Number]Last Name/First Name/Initial [Middle ...
    Posted to Construction Advice (Forum) by brianbos on November 6, 2007
1 2 Next >