Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: Regular Expression: search two times for the same number of any signs

by Ratazong (Monsignor)
on Nov 29, 2016 at 10:19 UTC ( #1176780=note: print w/replies, xml ) Need Help??


in reply to Re: Regular Expression: search two times for the same number of any signs
in thread Regular Expression: search two times for the same number of any signs

Hi hippo

Unfortunately, this approach violates the spec: the second 'x' might qualify for a "." ("any sign"), and might not indicate the middle of the string.

So long, Rata

  • Comment on Re^2: Regular Expression: search two times for the same number of any signs

Replies are listed 'Best First'.
Re^3: Regular Expression: search two times for the same number of any signs
by hippo (Bishop) on Nov 29, 2016 at 10:31 UTC

    If that's really the case (and you are probably right) then maybe change the order: find the first and last occurrence of 'x', calculate where the middle one should be and look there?

    However, the spec is a little woolly and the whole thing is still shouting "XY!" at me.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1176780]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (1)
As of 2023-03-31 00:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which type of climate do you prefer to live in?






    Results (74 votes). Check out past polls.

    Notices?