![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | regex help in a hurry and my minds not working, need to be able to parse something like the following aksdjf[need.this]akdjkjdkfj basically I need the stuff between the square brackets so the result would be need.this thanks in advance |
My System Specs![]() |
| | #2 (permalink) |
| | Re: regex help $str = 'aksdjf[need.this]akdjkjdkfj' $str -replace '.*\[(.*)].*','$1' -- Kiron |
My System Specs![]() |
| | #3 (permalink) |
| | Re: regex help love ya man! tr "Kiron" wrote: Quote: > $str = 'aksdjf[need.this]akdjkjdkfj' > $str -replace '.*\[(.*)].*','$1' > > -- > Kiron > |
My System Specs![]() |
| | #4 (permalink) |
| | Re: regex help Something like: if ($myString -match '\[(.+)\]') { $internalValue = $matches[1] } -- Kirk Munro [MVP] Poshoholic http://poshoholic.com "tonyr" <tonyr@xxxxxx> a écrit dans le message de groupe de discussion : C4F49F6A-7B18-49F6-AA31-2B2BA5346B58@xxxxxx... Quote: > in a hurry and my minds not working, need to be able to parse something > like > the following > > aksdjf[need.this]akdjkjdkfj > > basically I need the stuff between the square brackets so the result would > be > > need.this > > thanks in advance > > |
My System Specs![]() |
| | #5 (permalink) |
| | Re: regex help Sorry, disregard that, refresh is slow today and I thought you were still waiting on an answer. "Kirk Munro [MVP]" <see.my.about.page.on@xxxxxx> a écrit dans le message de groupe de discussion : B14FA603-79E3-476B-88EC-B75A0AD9A2B0@xxxxxx... Quote: > Something like: > > if ($myString -match '\[(.+)\]') { > $internalValue = $matches[1] > } > > -- > Kirk Munro [MVP] > Poshoholic > http://poshoholic.com > > > "tonyr" <tonyr@xxxxxx> a écrit dans le message de > groupe de discussion : > C4F49F6A-7B18-49F6-AA31-2B2BA5346B58@xxxxxx... Quote: >> in a hurry and my minds not working, need to be able to parse something >> like >> the following >> >> aksdjf[need.this]akdjkjdkfj >> >> basically I need the stuff between the square brackets so the result >> would be >> >> need.this >> >> thanks in advance >> >> |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Regex help please? | PowerShell | |||
| regex help | PowerShell | |||
| Regex Help | PowerShell | |||
| Regex Help | .NET General | |||
| regex | PowerShell | |||