wiki.tango.info

Talk:TINT

From wiki.tango.info

Jump to: navigation, search

TINT separators

http://wiki.tango.info/w/mul/index.php?title=TINT&diff=prev&oldid=13053

  • now 341234134-1/1 is forbidden
  • now 3419234823ü1ü1 is allowed

I would prefer the former method: allow mix, but show a set of separators. can maybe be extended. Tobiasco 2008-04-10T00:23:43 (UTC)

  • "now 341234134-1/1 is forbidden" - when was it ever not? Chrisjjj 2008-04-10T10:40:39 (UTC)
  • "now 3419234823ü1ü1 is allowed" - when was it ever not? Chrisjjj 2008-04-10T10:40:39 (UTC)

tools.tango.info/tagger

... should except all TINT input formats. regex is needed for processing. It needs to extract three elements, TIN d# t#.

a try:

* [0-9]{13,14} * [-/\] * [0-9]{1,2} [-/\] [0-9]{1,4} * .[A-Za-z0-9]{2,8}$

Tobiasco 2008-03-06T17:57:26 (UTC)

tagger now accepts

~^([0-9]{12,14}[\\\\/-][0-9]{1,}[\\\\/-][0-9]{1,})$~

more is needed

  • root
  • file extension.
  • good would be to allow text, like in
    • 01234567890123_sometext/2/4_sometext.flac
    • 01234567890123-2_sometext/4_sometext.flac
  • comments marked with #

maybe the regex could use groups and get TIN d# and t# out directly. IIRC php supports that.

try

~^([0-9]{12,14}[\\\\/-][0-9]{1,}[\\\\/-][0-9]{1,})$~
int preg_match  ( string $pattern  , string $subject  [, array &$matches  [, int $flags  [, int $offset  ]]] )

with 8 groups

~^([^0-9]){0,}([0-9]{12,14})([a-z_-]{0,})([\\\\/-])([0-9]{1,})(([_|-|a][0-9a-z_\.-]{0,}){0,})([\\\\/-])([0-9]{1,})(([_|-|a][0-9a-z_\.-]{0,})((.[a-zA-Z0-9]{1,8}){0,1})(([ ]{0,}#[a-zA-Z0-9]{1,}){0,1})$~
~^([^0-9]){0,}([0-9]{12,14})([a-z_-]{0,})([\\\\/-])([0-9]{1,})(([a-z_-][a-z_0-9-]{0,}){0,})([\\\\/-])([0-9]{1,})([a-z_-]{0,})((.[a-zA-Z0-9]{1,8}){0,1})(([ ]{0,}#[a-zA-Z0-9]{1,}){0,1})$~
~^([^0-9]){0,}([0-9]{12,14})([a-z_-]{0,})([\\\\/-])([0-9]{1,})([a-z_-]{0,})([\\\\/-])([0-9]{1,})(([_-][a-z_-]{0,}){0,})((.[a-zA-Z0-9]{1,8}){0,1})(([ ]{0,}#[a-zA-Z0-9]{1,}){0,1})$~
  1. non numeric root
  2. TIN
  3. text a-z_-
  4. seperator
  5. d#
  6. text a-z_-
  7. seperator
  8. t#
  9. text a-z_-
  10. file extension
  11. comment