News for hackers. Stuff that matters.
Re:The New ‘Absent Operator’ in Ruby’s Regular Expressions by elchief on Thursday March 23, 2017 @04:56PM (#13944178)
`x` mode and DEFINE can your friends. Example

  (?xi)
  (?(DEFINE)
  
    (?<year> \d{4} )  # I'm a comment
  
    (?<brand> honda|toyota )
  
    (?<model> crx|prius )
  )
...later...

  ((?&year)) ((?&brand)) ((?&model))

There are no comments on this comment yet.