code: def test_regextokenizer():
      value = u("AAAaaaBBBbbbCCCcccDDDddd")
  
      rex = analysis.RegexTokenizer("[A-Z]+")
      assert [t.text for t in rex(value)] == [
          "AAA",
          "BBB",
          "CCC",
          "DDD",
      ]
  
      rex = analysis.RegexTokenizer("[A-Z]+", gaps=True)
      assert [t.text for t in rex(value)] == [
          "aaa",
          "bbb",
          "ccc",
          "ddd",
      ]
  
imports: from __future__ import with_statement
  import pytest
  from whoosh import analysis, fields, qparser
  from whoosh.compat import b, u, unichr
  from whoosh.compat import dumps
  from whoosh.filedb.filestore import RamStorage
label_desc: Use image node_id 1 for calling a global function with example usage: test_regextokenizer() without return types