samples/stringtypes.json

[
    {
        "MemberType": "AliasProperty",
        "MemberName": "Size",
        "Value": "Length",
        "TypeName": "System.String"
    },
    {
        "MemberType": "ScriptMethod",
        "MemberName": "IsIPAddress",
        "Value": "$this -match \"^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}$\"",
        "TypeName": "System.String"
    },
    {
        "MemberType": "ScriptMethod",
        "MemberName": "Reverse",
        "Value": "for ($i=$this.length;$i -ge 0;$i--) {\r\n $reverse=$reverse+$this[$i]\r\n}\r\n$reverse",
        "TypeName": "System.String"
    },
    {
        "MemberType": "ScriptProperty",
        "MemberName": "IsEmail",
        "Value": "$this -match \u0027^\\S+@([\\w-]+)\\.(com|edu|org|net)$\u0027",
        "TypeName": "System.String"
    },
    {
        "MemberType": "ScriptMethod",
        "MemberName": "Randomize",
        "Value": "($this.ToCharArray() | get-random -Count $this.length) -join \"\"",
        "TypeName": "System.String"
    },
    {
        "MemberType": "ScriptMethod",
        "MemberName": "Reverse",
        "Value": "($this.ToCharArray())[-1..-$this.length] -join \"\"",
        "TypeName": "System.String"
    }
]