(Made to include nordic names)
public static function niceUrl(s:String):String { s = s.toLowerCase(); s = s.replace(/^\s+|\s+$/g, ""); s = s.replace(/[_|\s]+/g, "-"); s = s.replace(/[øöõóò]+/g, "o"); s = s.replace(/[åäáàãâ]+/g, "a"); s = s.replace(/[ëéèê]+/g, "e") s = s.replace(/[^a-z0-9-\/]+/g, ""); s = s.replace(/[-]+/g, "-"); s = s.replace(/^-+|-+$/g, ""); return s; }