Remove empty spaces and period

前端 未结 3 1270
悲&欢浪女
悲&欢浪女 2021-01-25 08:03

I cannot get this regex to work:

\"4.  182 ex\" (number, period, 2 blank spaces, 3 numbers, blank space, 2 characters\"

The regex syntax should

3条回答
  •  抹茶落季
    2021-01-25 08:27

    ^([\d]+)\.[\s]+([\d]+)[\s]..
    

    Tested with perl:

    > echo "4. 182 ex" | perl -lne 'print $1,$2 if(/^([\d]+)\.[\s]+([\d]+)[\s]../)'
    4182
    

提交回复
热议问题