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

easy regex do not work...

Last post 04-15-2010, 6:59 PM by Aussie Susan. 1 replies.
Sort Posts: Previous Next
  •  04-15-2010, 11:26 AM 63928

    easy regex do not work...

    Hello,

     

    I have a problem with a simple regexp

    I have this exemple : 

    X-|Y

     my regexp is : /^(.*?)-\|(.*?)$/

    It is simply do not work..

    I work with activeperl under OSX 10.6.

    Do you have any idea ?

     

     

  •  04-15-2010, 6:59 PM 63958 in reply to 63928

    Re: easy regex do not work...

    I could answer "It works for me" but that would simply prolong this thread unnecessarily!

    Perhaps you could explain in what way does it not work. Does it create "compile" errors? Runtime errors? Create the wrong capture values?

    Also, can you please provide a bit more of the code around this as there may be something going on there.

    I realise that it is in a different forum on this site, but there are posting guidelines in the "Construction Advice" forum at http://regexadvice.com/forums/thread/60465.aspx. One of the things asked for there is to not make up examples because in doing so you often remove some important characteristic when you try to make it "simple to demonstrate".

    Susan

View as RSS news feed in XML