Question: specific date is "**2013-11-12**".

I want to extract day, month and year from above date. Please let me know how can I extract?

Answer: 
Try this:

```
$output -replace ".*($regex).*",'$1'

```
First I want to thank everyone for their help and their efforts in trying to figure this out for me. All of your suggestions have been good, and useful.

I had a think, and I realized that I am looking for a command that doesn't really exist, so I just wrote a function for it instead:

```
function Regex-Match {

    [cmdletbinding()]
    param (
        [parameter(Position=0,Mandatory=$true,ValueFromPipeline=$false)]$RegexString,
        [parameter(Position=1,Mandatory=$true,ValueFromPipeline=$true)]$SearchString        
    )

    $Results = @($SearchString | Select-String -Pattern $RegexString | % {$_.Matches} | % {$_.Value})

    Return $Results
}

```

To further shorten this, I can use 

```
New-Alias -Name regx -Value Regex-match

```

Example command:

```
"test string" | regx "\w\s\w"

```

or

```
Regex-Match -SearchString (gc .\Stuff.txt) -RegexString "\w+"

```