in reply to Re: how to split a string at [ ?
in thread how to split a string at [ ?
Thanxs all a lot for the many suggestions. Because it seems the more felxible, I started to try with the above Regexp::Common.
But running it gives:$tmp[5] = "BCInletTemperature = 90[C]"; print "$tmp[5] xx\n"; $temp = $tmp[5] =~ m{ = \s+ ($RE{num}{real}) \[ }xms; print "xxx $temp xxx\n";
Perl isName "charnames::CARP_NOT" used only once: possible typo at /usr/lib/p +erl5/5.18.2/Carp.pm line 437. Name "Regexp::Common::delimited::CARP_NOT" used only once: possible ty +po at /usr/lib/perl5/5.18.2/Carp.pm line 437. BCInletTemperature = 90[C] xx xxx 1 xxx
at openSUse Leap 42.3.perl --version This is perl 5, version 18, subversion 2 (v5.18.2) built for x86_64-li +nux-thread-multi
Regards, buchi
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: how to split a string at [ ?
by hippo (Archbishop) on Jul 06, 2018 at 12:55 UTC | |
|
Re^3: how to split a string at [ ?
by haukex (Archbishop) on Jul 06, 2018 at 12:58 UTC |