2

所以我已经使用artisannew为我的数据库播种了一些 ID db:seed,但现在我需要将所有 ID 增加 1。我知道如何找到一个数字,但我不知道如何在替换框中增加它(如果它是可能的)。

<?php
return array(
      array("title"=>'Paris',
        "country_id"=>0),
      array("title"=>'Lion',
        "country_id"=>0),
      array("title"=>'Nice',
        "country_id"=>0),
      array("title"=>'Nantes',
        "country_id"=>0),
      array("title"=>'Bordeaux',
        "country_id"=>0),
      array("title"=>'Montpellier',
        "country_id"=>0),
      array("title"=>'Berlin',
        "country_id"=>1),
         array("title"=>'Halle',
        "country_id"=>1),
           array("title"=>'Leipzig',
        "country_id"=>1),
             array("title"=>'Dredsen',
        "country_id"=>1),
     array("title"=>'Hamburg',
        "country_id"=>1),
     array("title"=>'Altona',
        "country_id"=>1),
      array("title"=>'Rome',
        "country_id"=>2),
      array("title"=>'Verona',
        "country_id"=>2),
      array("title"=>'Venice',
        "country_id"=>2),
      array("title"=>'Milan',
        "country_id"=>2),
      array("title"=>'Naples',
        "country_id"=>2),
      array("title"=>'Turin',
        "country_id"=>2),
        array("title"=>'Luzern',
        "country_id"=>3),
         array("title"=>'Zurich',
        "country_id"=>3),
          array("title"=>'Berne',
        "country_id"=>3),
           array("title"=>'Geneva',
        "country_id"=>3),
            array("title"=>'Basel',
        "country_id"=>3),
             array("title"=>'Lugano',
        "country_id"=>3)
    );
4

1 回答 1

2

我已经使用Emmet sublime plugin对此进行了测试。

安装后,在启用正则表达式的情况下进行搜索\d,然后只需点击Ctrl+即可将所有选定的数字加一。

于 2013-01-17T14:24:42.050 回答