Examples of valid input:
v
x x xx xxx xxxxx
Ok, it's probably not very useful, but I thought I'd post it anyway.
#!/usr/local/bin/perl use warnings; use strict; while (<>) { print "fibo\n" if /^\s*(?:((?(1)(?(3)(?(2)\2|\3)(\1)|(\S))|\S))\s+ +)+\z/; }
In reply to fibonacci regex by mauke
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |