Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Regular Expressions
  4. Perl regex anchor merely matches at the position of the end of previous match period

Perl regex anchor merely matches at the position of the end of previous match period

Scheduled Pinned Locked Moved Regular Expressions
regexperlquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    marbooth
    wrote on last edited by
    #1

    What is Perl regex anchor to merely match at the position where the previous match ended, as anchor \G matches at the position where the previous match ended, and also at the first match attempt the \G matches at the start of the string in the way \A does.

    M 1 Reply Last reply
    0
    • M marbooth

      What is Perl regex anchor to merely match at the position where the previous match ended, as anchor \G matches at the position where the previous match ended, and also at the first match attempt the \G matches at the start of the string in the way \A does.

      M Offline
      M Offline
      marbooth
      wrote on last edited by
      #2

      Grateful to God who guide me to the best path Perl's way

      (?!^)\G

      or

      (?!\A)\G

      R 1 Reply Last reply
      0
      • M marbooth

        Grateful to God who guide me to the best path Perl's way

        (?!^)\G

        or

        (?!\A)\G

        R Offline
        R Offline
        RedDk
        wrote on last edited by
        #3

        Sometimes things at CP are kinda hinky. Then SO usually leaves less stones unturned: .net - In Regex, what is the difference between (?!^)\G and \G(?!^)? - Stack Overflow[^] Stones unturned

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups