Tagged Fiddles
- 1Revisions2Forks
Clean DNI/NIE input
/[^A-HJ-NP-TV-Z0-9]/giA rather strict regex for cleaning DNI/NIE input. Just replacing whatever this matches with nothing and run uppercase on the result should give you a nice NIE/DNI.X-09375379-G "X-09375379-G" X.09375379.G x-09375379-g +´!"#€%&/()=?`©@£$?§|[]?± - 1Revisions1Forks
Clean DNI/NIE input
/[A-Z]*[-.]*[0-9]{8}[-.]*[A-Z]{0,1}/giA rather strict regex for cleaning DNI/NIE input. Just replacing whatever this matches with nothing and run uppercase on the result should give you a nice NIE/DNI.X-09375379-G "X-09375379-G" X.09375379.G x-09375379g +´!"#€%&/()=?`©@£$?§|[]?± 72078974x