Help for this page

Select Code to Download


  1. or download this
    #terms
    ID|related terms delimited by '|'
    ...
    Program input: ... 2020 Ford F 250 is great but I prefer Tesla Model-V
    + ...
    
    Desired output: ... <2><2020 Ford F 250> is great but I prefer <1><Tes
    +la model-V> ... #<2> and <1> are the IDs for the terms
    
  2. or download this
    $term1 = 'Tesla S|Tesla model V|Tesla model|TESLA';
    $term2 = 'Ford RAM truck|2020 Ford Mustand|Ford ranger|Ranger|ford|202
    +0 Ford F-250|2020 Ford F250|Ford F 250';
    ...
    $input =~ s/($term2)/\<2\>\<$1\>/ig;
    .
    .