http://qs1969.pair.com?node_id=11129271


in reply to Re^2: How to enforce match priority irrespective of string position
in thread How to enforce match priority irrespective of string position

Of course, '$re_cond_1' may be not equal to '$re_match_1'. But I wanted to show the simplest example. Further '\1' can be used to avoid self-repeating.

Replies are listed 'Best First'.
Re^4: How to enforce match priority irrespective of string position
by LanX (Saint) on Mar 07, 2021 at 14:05 UTC
    > Of course, $re_cond_1 may be not equal to $re_match_1

    my point is, that it has IMHO no effect at all if it's identical.

    > But I wanted to show the simplest example

    too simple examples can confuse :)

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery

      too simple examples can confuse :)

      Ha! Well, I'm easy to confuse. I'm not a "real" programmer--well, I've done some amazing things, but most here would be surprised at how I'd done them. I have a considerable handicap: it seems the part of my brain that should process abstract math and logic went undeveloped. I've never been able to grasp abstractions, even in the world of programming. Everything has to be concrete for me--i.e., no objects, no references, no "bless-ings"...I just don't "get" any of this stuff, and what I don't understand I cannot implement. This means I have also found very few modules written by others that I am able to use--especially ones like parsers. In all probability, there's a module out there somewhere that would help do what I need to do; but I would probably try studying it for days to figure out how to implement it, and even then may not succeed. Been there, done that. So, I just have to do my own thing. Every time.

      Note that I am paid nothing for my programming--it's all volunteer to help others, and I'm internally driven to get it done, knowing no one else filling this niche.

      Blessings,

      ~Polyglot~

      > my point is, that it has IMHO no effect at all if it's identical.

      I think you're right! And my suggestion simply reduces to the same but without look-ahead :).
      Too simple example even confused its author.