Forum Discussion
Dharshana_11419
Nimbostratus
Nov 20, 2017findstr - sub string of last occurrence of a character to the end of the string
Hi,
Can someone please help me how to find the last occurrence of a character and get a sub string from thereafter to the end of the string using findstr?
i.e from XXX-GHDF-12XD45 i need to match 12X...
Andy_McGrath
Cumulonimbus
Nov 20, 2017set listOfStr [split "XXX-GHDF-12XD45" "-"]
set location [expr {[llength $listOfStr] - 2}
set output [lindex $listOfStr $location]
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
