Author Topic: How to create Regex for Nzedb?  (Read 3848 times)

Offline bundyboss

  • Junior Indexer
  • **
  • Posts: 5
  • Helpful: +0/-0
How to create Regex for Nzedb?
« on: 2015-10-29, 04:32:30 AM »
Hi,
I've create a lot of regex for newnab but I've not found explanation of how to create regex for NzeDB?
For newzab you have two  items (?P<name>) and (?P<parts>).
On Nzedb doesn't seems to work like that.
There are (?P<match1>) and (?P<match0> or (?P<match2>).

So could anyone can explain how it's works?

Thanks in advance for your reply.

Offline Wally73

  • Overlord
  • ******
  • Posts: 259
  • Helpful: +28/-1
  • i'm nuts
Re: How to create Regex for Nzedb?
« Reply #1 on: 2015-10-29, 04:39:37 AM »
read the two sticky posts in this Regex sub forum

Offline bundyboss

  • Junior Indexer
  • **
  • Posts: 5
  • Helpful: +0/-0
Re: How to create Regex for Nzedb?
« Reply #2 on: 2015-10-29, 05:17:20 AM »
I've already read it and not answer to my question!
I know how to create a regex but I don't know what items are used to make a release. This is my question!
For newzab you have two  items (?P<name>) and (?P<parts>).
On Nzedb doesn't seems to work like that.
There are (?P<match1>) and (?P<match0> or (?P<match2>).
Nothing about part?

So could anyone can explain how it's works?

Offline Wally73

  • Overlord
  • ******
  • Posts: 259
  • Helpful: +28/-1
  • i'm nuts

Offline bundyboss

  • Junior Indexer
  • **
  • Posts: 5
  • Helpful: +0/-0
Re: How to create Regex for Nzedb?
« Reply #4 on: 2015-10-29, 06:16:44 AM »
I'm sorry for my poor english but as I said I've already read it.
In your link there are no reference to  (?P<match1>).
Your link just explain how to create a Regex. My question is how to create a regex dedicated for nzeDB?
If (?P<match1>) is not add in the regex how it's work?

I'm sorry but is not written in your link!

Offline bundyboss

  • Junior Indexer
  • **
  • Posts: 5
  • Helpful: +0/-0
Re: How to create Regex for Nzedb?
« Reply #5 on: 2015-10-29, 09:17:36 AM »
I've tested with my newsnab regex and it seems to work but I don't know if it use the (?P<parts>\d{1,3}\/\d{1,3}) field.

I've tested with this regex for exemple:
/VA-(?P<name>.*?) ]-(\(|\[)(?P<parts>\d{1,3}\/\d{1,3})(\)|\])/i

Offline kevin123

  • Overlord
  • ******
  • Posts: 456
  • Helpful: +49/-0
Re: How to create Regex for Nzedb?
« Reply #6 on: 2015-10-31, 03:42:04 AM »
In the pages where you add the regex, it explains how they work, here for example: https://github.com/nZEDb/nZEDb/blob/master/www/themes_shared/templates/admin/collection_regexes-edit.tpl#L24

Offline bundyboss

  • Junior Indexer
  • **
  • Posts: 5
  • Helpful: +0/-0
Re: How to create Regex for Nzedb?
« Reply #7 on: 2015-11-02, 01:58:13 AM »
Thanks Kevin this is what I need.