• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

Anyone any good at regexp?

Collapse
X
  •  
  • Filter
  • Time
  • Show
Clear All
new posts

    #11
    Originally posted by suityou01 View Post
    Nice. So who do I store this code in the database?

    I think they call this the XY problem.
    No, they call this the suity problem - drip feeding requirements.

    Now, what is it you are actually trying to do?

    Comment


      #12
      Originally posted by mudskipper View Post
      No, they call this the suity problem - drip feeding requirements.

      Now, what is it you are actually trying to do?
      Ah so you now agree that getting requirements nailed down is important.

      I already told you what I am trying to do, come up with a regexp to parse that string.

      Funnily enough this is to parse emails. The only thing is that the system needs to be configurable. In that I need to be able to define a template that is used to parse the email.

      You now have more requirements than I ever had.
      Knock first as I might be balancing my chakras.

      Comment


        #13
        I found this ruby - Regex - Matching text AFTER certain characters - Stack Overflow

        And it solves exactly the problem I have.

        But when I follow the advice it doesn't work

        Stackoverflow's green ticks are dead to me.
        Knock first as I might be balancing my chakras.

        Comment


          #14
          There are lots of different implementations of regex. Might be a particular feature lacking in the version you're using. eg. not all of them support look-behind.

          Comment


            #15
            Originally posted by Bunk View Post
            There are lots of different implementations of regex. Might be a particular feature lacking in the version you're using. eg. not all of them support look-behind.
            Good point

            I found an online one that supports .net.

            Still doesn't work.
            Knock first as I might be balancing my chakras.

            Comment


              #16
              I think I got my answer to the OP
              Knock first as I might be balancing my chakras.

              Comment


                #17
                Originally posted by Jamie Zawinsk
                Some people, when confronted with a problem, think "I know, I'll use regular expressions." Now they have two problems.

                Comment


                  #18
                  Originally posted by suityou01 View Post
                  Ah so you now agree that getting requirements nailed down is important.

                  I already told you what I am trying to do, come up with a regexp to parse that string
                  And why are you trying to use a regular expression to parse what looks like a form of structured data? You've already been given a better solution.

                  Is there a technical constraint youve omitted?

                  Comment


                    #19
                    Originally posted by TheCyclingProgrammer View Post
                    And why are you trying to use a regular expression to parse what looks like a form of structured data? You've already been given a better solution.

                    Is there a technical constraint youve omitted?
                    The structure of the data can be anything. It's an email. I just gave you the example I am working with.

                    All constraints highlighted in post 12.
                    Knock first as I might be balancing my chakras.

                    Comment


                      #20
                      Originally posted by suityou01 View Post
                      The structure of the data can be anything. It's an email. I just gave you the example I am working with.

                      All constraints highlighted in post 12.
                      Well I for one don't understand what you're trying to do.

                      Comment

                      Working...
                      X