Regular Expression Extractor

Reference

正则表达式

What it is

Allows the user to extract values from a server response using a Perl-type regular expression. As a post-processor, this element will execute after each Sample request in its scope, applying the regular expression, extracting the requested values, generate the template string, and store the result into the given variable name.

Regular Expression Extractor_第1张图片

Attribute

Regular Expression Extractor_第2张图片
Regular Expression Extractor_第3张图片


How use




  
    
      
      false
      false
      
        
      
      
    
    
      
        continue
        
          false
          1
        
        1
        1
        1492565762000
        1492565762000
        false
        
        
      
      
        
          true
          true
          200
          OK
          Dummy Sampler used to simulate requests and responses
without actual network activity. This helps debugging tests.
          {
    "sysNo": "11111",
    "skuid": "487626525247",
    "productID": "101-006-72958",
    "productTitle": "苹果(Apple)iPhone 6 Plus (A1524) 16GB 金色 移动联通电信4G手机",
    "price": "556600",
    "activePrice": "",
    "sysNo": "22222",
    "marketprice": "608800",
    "promotionDesc": "A1524、A1586为三网通版,支持移动\/联通\/电信4G\/3G\/2G。找水货?找翻新?没有!易迅网为国行正品代言!!",
    "manufacturerCode": "49",
    "manufacturerName": "苹果(Apple)",
    "evaluationNum": "1717",
    "gradeNum": "48",
    "onlineQty": "796",
    "shippingday": "0t0",
    "gift": 0,
    "promotionType": "0",
    "attribute": "2000000000e214处理器;(为保持样式美观,此处有删减文字,请知悉!);43257eFDD-LTE\/TD-LTE\-LTE)\/电信4G(FDD-LTE);移动3G(TD-SCDMA)\353e2;49e9?金色;42914?内存e1?16G;43246?制式e4?5.5寸三网通版",
    "saleNum": "454",
    "productTypeMasterid": "0",
    "areaCode": "1",
    "classid": "203320",
    "tag": "超薄手机 大屏手机 待机时间长 高清屏 女神手机 拍照功能强 商务手机 外观漂亮 指纹识别 主流潮机",
    "goodsUrl": "http:\/\/item.yixun.com\/item-2142717.html",
    "picUrl": "http:\/\/img3.wgimg.com\/qqbuy\/2295220799\/item-00000000000000000000007188CE4A3F.0.jpg\/200?55DAE367",
    "reachable": "0"
},
          ${__Random(50,500)}
          ${__Random(1,50)}
          ${__Random(1,5)}
        
        
          
            false
            goodsid
            "(sysNo)": "(.+?)",
            $2$
            ERROR
            2
          
          
        
        
          false
          true
          false
        
        
        
          false
          
            saveConfig
            
              
              true
              true
              true
              
              true
              true
              true
              true
              false
              true
              true
              false
              false
              true
              true
              false
              false
              false
              true
              0
              true
              true
              true
              true
              true
            
          
          
        
        
      
    
  



output:

Regular Expression Extractor_第4张图片

你可能感兴趣的:(Regular Expression Extractor)