Using Delimiters to get the end of the string
Hi..
Im want to extract a part of a word. Say for example, in abcd_def_fgh i want abcd_def. That is except the text occuring after the the last delimiter(_).Also the length and the number of delimiters are not fixed. Some more examples: blah_blah_blah_blah ->blah_blah_blah a_b_c->a_b t_d->t Any ideas on how this can be done? Thanks. |
in bash
Code:
# echo $s |
Thanks man
|
In Perl:
Code:
my $s = "blah_blah_blah_blah_set"; |
All times are GMT -5. The time now is 09:04 AM. |