Size: a a a

2020 December 17

АК

Алексей Клименко... in use Perl or die;
Алексей Клименко
That's a good cat!

I use this one:
источник

J

Josh in use Perl or die;
How do I format for unknown length ?
For example :
\d{1}\.d{2} = 4.88

I want a regexp for 4.888 or 444.88888
How do I do this ?
Where the number of digits is not known but it has a pattern of xx.yy or 22.44.
источник

IB

Ivan Bessarabov in use Perl or die;
Josh
How do I format for unknown length ?
For example :
\d{1}\.d{2} = 4.88

I want a regexp for 4.888 or 444.88888
How do I do this ?
Where the number of digits is not known but it has a pattern of xx.yy or 22.44.
источник

J

Josh in use Perl or die;
Thanks, I read. That's when the quantifier is certain. I'm looking for uncertain number of digits.
источник

g

gibzer in use Perl or die;
Как сделать, чтобы при сплите получалось ровно столько значений, сколько задано в лимите?
То есть я хочу получить тут
perl -M'Data::Dumper' -e '@t = split(/=/, "ab", 2); print Dumper(\@t);'
вместо
$VAR1 = [
         'ab'
       ];

такое
$VAR1 = [
         'ab',
         undef
       ];
источник

g

gibzer in use Perl or die;
Это надо чтобы получить консистентный хеш.
источник

АК

Алексей Клименко... in use Perl or die;
Josh
How do I format for unknown length ?
For example :
\d{1}\.d{2} = 4.88

I want a regexp for 4.888 or 444.88888
How do I do this ?
Where the number of digits is not known but it has a pattern of xx.yy or 22.44.
/\d+\.\d+/
источник

АК

Алексей Клименко... in use Perl or die;
gibzer
Это надо чтобы получить консистентный хеш.
Пойти циклом, пушнуть хвост?
источник

IB

Ivan Bessarabov in use Perl or die;
Josh
Thanks, I read. That's when the quantifier is certain. I'm looking for uncertain number of digits.
Read it several more times and you will find the answer in that section.
источник

АК

Алексей Клименко... in use Perl or die;
Ivan Bessarabov
Read it several more times and you will find the answer in that section.
источник

SZ

Sergey Zhmylove in use Perl or die;
Josh
Thanks, I read. That's when the quantifier is certain. I'm looking for uncertain number of digits.
What do you need? We can help you but we still don't understand your task
источник

J

Josh in use Perl or die;
Thanks. What I needed was the '+'.
источник

J

Josh in use Perl or die;
Sergey Zhmylove
What do you need? We can help you but we still don't understand your task
Thanks for the help. But I want to learn, if I don't learn by myself, I will have to keep asking.
источник

SZ

Sergey Zhmylove in use Perl or die;
Josh
Thanks for the help. But I want to learn, if I don't learn by myself, I will have to keep asking.
Np, you're very welcome with your questions
источник

J

Josh in use Perl or die;
Ivan Bessarabov
Read it several more times and you will find the answer in that section.
You're right. It's the + that I needed.
источник

IB

Ivan Bessarabov in use Perl or die;
👍
источник

IB

Ivan Bessarabov in use Perl or die;
It is a good idea to start by reading a book about perl. There is one book that starts from the very beginning. https://www.amazon.com/gp/product/1491954329/
источник

A

Alexey Myshkin in use Perl or die;
gibzer
Как сделать, чтобы при сплите получалось ровно столько значений, сколько задано в лимите?
То есть я хочу получить тут
perl -M'Data::Dumper' -e '@t = split(/=/, "ab", 2); print Dumper(\@t);'
вместо
$VAR1 = [
         'ab'
       ];

такое
$VAR1 = [
         'ab',
         undef
       ];
perl -MData::Dumper -E '@a=(1);push @a,(undef) x (6-length(@a));say Dumper \@a'
источник

SZ

Sergey Zhmylove in use Perl or die;
Alexey Myshkin
perl -MData::Dumper -E '@a=(1);push @a,(undef) x (6-length(@a));say Dumper \@a'
Плохой вариант
источник

A

Alexey Myshkin in use Perl or die;
Sergey Zhmylove
Плохой вариант
Плохой ответ
источник