Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Regex Tool

by Yunus (Novice)
on Jun 29, 2006 at 08:58 UTC ( #558260=CUFP: print w/replies, xml ) Need Help??

Hi everyone! New tool to build Perl-compatible Regex (mine actually) go to the Regex Tool I would like to have some comments/feedback.TQ

Replies are listed 'Best First'.
Re: Regex Tool
by zentara (Archbishop) on Jun 29, 2006 at 10:34 UTC
    My comment is to add an html link to your url so we don't have to cut'n'paste, like
    < a href= >appbuilder_demo</a>

    Which would then appear as: appbuilder_demo

    I'm not really a human, but I play one on earth. flash japh
      thank you, guys.
Re: Regex Tool
by Ieronim (Friar) on Jun 29, 2006 at 11:29 UTC
    it is great work in JavaScript but i doubt of its usefulness :(
    Can you, for example, describe step-by-step how to make a regex
    in your builder? It's quite pathological, of course, but i don't see any sense of using a builder for simple regexes.

      In blead you would be better off with just listing the possibilities. In maint your regex isnt too bad.


      To be honest, i'm also doubt its usefulness for experts ;) My intent is to help anyone who feel difficult to remember the options for writing regex (i'm one of them, i refered a lot while writing the app, duh!). Also for those who are just getting their hands on writing regex (may attract them to regex, i hope!).

      there's no option for qr// though. just m// and s///.

      For the regex, insert string item 'ind', then create subregex with selection group, insert 'ex', create subregex, insert string item 'es' as group, with extra option 'not necessary', return to previous, insert item , return to previous, insert item, insert string 'ices', complete, return, group item. select 'i' at flag.

      Yes,quite tedious. Consider this as an experiment. really need your help (and everyone else) for giving feedback. thanks.
Re: Regex Tool
by planetscape (Chancellor) on Jun 30, 2006 at 16:39 UTC
      Depends. I've tried The Regex Coach actually when creating the regex builder. Yes, very good indeed. But for testing (it's like you try, and compile). i found it did not list out the option of what you can do/write, before you write the regex. (unless i missed something)

      My intent is to guide someone, who's new with regex (and with incomplete list of regex option in his mind) and show him/her what you can do next. It just like telling 'you can do this, and that, and blablabla...' and u decide what you want to do. I have seen such tool for javascript and HTML, and informally IDE also do this (by displaying the toolbar). It's an attempt to do the same thing for regex.

      But of course, it's still far from complete. Lots more to be done i.e. like testing the regex like (most) other tools do.
Re: Regex Tool
by eric256 (Parson) on Jun 29, 2006 at 22:18 UTC put \< and \> in my regex at the begging and end. Also how do you anchor ? i.e. '^' and '$'?

    Eric Hodges
      Select the anchor options, will automatically put '^' or '$' or '^$'. you're allowed to put only once per regex string (that's the regex rule, isn't it?).

      But there's a few bugs i.e. if you create sub regex, you can create something absurd like this ' /^item(^duhduh$) foo$/'. i'm still looking into it. sorry for that. (i hold this quote for a while...)

        Just for your interest:

        Multiple ^ or $ anchors would be legal.
        The /m modifier in combination with the /s modifier would match the intended behaviour.
        /m: match over multiple lines
        /s: . matches everything (even newlines)

        Note that you would have to insert code to match any newline either by . or by \s. See example below.

        my $text = <<"END"; a sample line item duhduh foo END $text =~ /^item.*(^duhduh$)\s*foo$/sm; print "\$1: '$1'\n"; # prints "$1: 'duhduh'"

        That doesn't explain why its adding \< and \> in my regex.

        Eric Hodges

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: CUFP [id://558260]
Approved by GrandFather
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (10)
As of 2018-06-19 09:20 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (111 votes). Check out past polls.