Giter Club home page Giter Club logo

regex-storm's Introduction

regex-storm

Regex Storm, online .NET-based regular expressions tester and resource.

About

This is the codebase for the site running at http://regexstorm.net/.

I am making this code public because, well, why not? The code is a bit outdated and no longer maintained, so please keep that in mind if you want to make use of it.

regex-storm's People

Contributors

lonekorean avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

regex-storm's Issues

Logical expressions in conditionals

In conditionals, you can actually put logical expressions in the evaluation, like

(?<int>[0-9]+[0-9]*)?          # Match an integer
(?<decimal>\.?(?(!int)[0-9]+)) # Make the decimal required if there is no integer

The reference doesn't comment about being able to do them. i.e. (?(!group)yes|no)
There is also (?(group || group)yes|no) etc.

\+ connected with ^ and alternative

Hi, just tried:
Patterrn: @"^(\+|\d)" this should match '+' or '0' (from input1: @"+" or imput2="0"), but it doesn't. Only '0' is asserted as matching.
When remove ^ and pattern is (+|\d), then it matches both '+' and '0'

Wrong matching after a lot of testing

I was testing different regex, with different options, with and without replace, and I didn't close or reload the tester page for hours.
And then I testet a regex, which should have matched 4 lines, but it matched only 3 lines.
I was 100% sure my regex is right, so I testet the regex in Notepad++ and I got 4 matches.
After resetting your RegexTester by reload in the browser, it machted 4 lines, too.
So I have to tell you, that your app is not always resetting properly after every change of an input.
It makes testing regex difficult, because before every minor change, you have to reload the page and fill again all empty inputs.
Sorry, but I don't have the steps to reproduce the error, because I used it for hours.
This is the regex, which had only 3 matches after then:
(?m:^([^\S\n]*)}[^\S\n]*)

This is the line, your app didn't match:
} else {

This is the tested input:

if ($InternalCall)
    {
        return $records
    }

    # -> now we have to render the collected data in a string to return

    $string = @()
    $first = $true

     $records | ForEach-Object { 
        if ($first) {


            # render first separator line
            # if you'd use the whole width of the console, in which powershell was startet, powershell.exe would remove
            # the next NewLine, so if you'd increase the width of the console with your mouse, the next line would merge
            # into the separator line, which looks not very nice, so I try not to create output with the consoles width
            $string += ("+" * $script:outputWidth - 1)


            $first = $false
        } else {
            $string += "*" * 5
        }
        $string += $_ | Select-Object * | Out-String
    }

$ end of text anchor not working

Perhaps I was misunderstanding my attempted regexes but trying to use $, as an indicator of the end of text input, didn't seem to work.

I've moved on from the issue, but I seem to recall I was using something like:

\d+$

To catch digits at the end of text input.

Unexpected behavior of '$' as anchor

  • Test strings:
    Game
    FunAndGames
    MiddleGame
    GameTaste
    LastGame
  • Regular Expression:
    Game$
  • Comments:
    I think it should match lines 1, 3, and 5, in multiline mode; it only matches 5 and that only if this line does not end with a newline.
    If the RegEx is ^Game, it will match 1 and 4 in multiline and 1 in non-multiline (as I expect).
    As far as I can tell, $ is behaving exactly like \Z, independent of the flags used.
    I tested the behavior in Chrome, Firefox and Internet Explorer.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.