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

Browse by Tags

All Tags » Code
  • xBase function parsing

    Hello, I need help to build a PCRE to parse xBase functions.   A simple sample code snippet would be: function test1() return function test2(lFirst) if lFirst return 1 endif return 2 function test3() As you can see, xBase function declarations always begin with "function" keyword, but ...
    Posted to Construction Advice (Forum) by leodamasio on June 7, 2011
  • Re: how can i get content of a specified tag

    This should do it, at least with PCRE (?i)(<body.+</body>)
    Posted to Discussion (Forum) by George G on December 27, 2009
  • find if either stringa or stringb do not exist in a string

    I am working on making a bbcode system with php using preg_replace(), and I am making it so that other tags will not work inside of a code block. This is the code I am currently using, it almost works: /(?!\[code\])(.*)(\[b\])(.+)(\[\/b\])(.*)(?<!\[\/code\])/Usi  what I want it to do is if [*code] and [*/code] are around the text inside, ...
    Posted to Construction Advice (Forum) by sarathi on July 31, 2009
  • How to valid ASPX URL?

    Hi all,I’m junior developer, so I ‘m not yet pick up Regular Expressions (>o<).In current situation, I want to check SharePoint URL is valid or not, and my simple coding as follows:if (strTargetASPX.Substring(0, 4).ToLower().Equals("http") &&    strTargetASPX.Substring(strTargetASPX.Length - 4, ...
    Posted to Discussion (Forum) by onming268 on June 4, 2009
  • 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
  • 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 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