Hi; I've got some strings that I need to parse the value(s) off of the key.
The key is (possibly) space-separated and terminate by a colon, and the value is delimited by single quotes. But there are (potentially) additional values for the key. Here is one real-world example (excerpt from the output of VBoxManage showvminfo vm): Name: 'tuba', Host path: '/Users/kwolcott/Shared/tuba' (machine mapping), writable What I want to parse is the part contained by single quotes. Perhaps I'd better use a capturing regex instead of split? Perhaps something like: $example_string =~ m|'($1)'|; $shared_folder = $1; Is there a better way to do this? What kind of string format is this called? Thanks, Ken Wolcott -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] http://learn.perl.org/
