's causing your problem -. matches any character (except newline), so your regex is essentially saying "match a backslash followed by any of these combinations, including a backslash followed by any single character." Just get rid of |. at the end of each regex, and you'll be fine.
As a side note, you really should be using a repository for holding the constant.character.escape.tm1 scope:
- name: string.quoted.double.tm1
  begin: '"'
  beginCaptures:
    '0': {name: punctuation.definition.string.begin.tm1}
  end: '"'
  endCaptures:
    '0': {name: punctuation.definition.string.end.tm1}
  patterns:
  - include: '#constant_character_escape'

  (...)

repository:
  constant_character_escape:
    name: constant.character.escape.tm1
    match: \\(x\h{2}|[0-2][0-7]{,2}|3[0-6][0-7]|37[0-7]?|[4-7][0-7]?)

The repository section should be (I believe) at the end of the language definition, as that's the only place I've ever seen it. With this pattern, you can essentially break your definitions into blocks and assign them "variable names", then include them where needed.

 Q:

Multiple columns in a row based on some group column

I have a table with name city having city, province and country columns and I want to display cities in a single row for each province with some separator.
City Province    Country

A    X           Z  
B    X           Z
C    X           Z
D    Y           Z
E    Y           Z  
F    Y           Z

I want following results
Province    City

X           A | B | C
Y           D | E | F

A:

select Province, group_concat(City SEPARATOR '|')
FROM `tablename`
group by Province

Refer: http://sqlfiddle.com/#!2/58afb1/3

 Q:

use flextable::display() in a function

I am trying to use
's causing your problem -. matches any character (except newline), so your regex is basically say " match a backslash followed by any of these combination, include a backslash followed by any single quality. " precisely get rid of |. at the end of each regex, and you'll be fine. 
 As a side note, you very should be using a repository for hold the constant.character.escape.tm1 scope: 
 - name: string.quoted.double.tm1 
   begin:' "' 
   beginCaptures: 
    ' 0': { name: punctuation.definition.string.begin.tm1 } 
   end:' "' 
   endCaptures: 
    ' 0': { name: punctuation.definition.string.end.tm1 } 
   form: 
   - include:' # constant_character_escape' 

   (...) 

 repository: 
   constant_character_escape: 
     name: constant.character.escape.tm1 
     match: \\(x\h{2}|[0 - 2][0 - 7]{,2}|3[0 - 6][0 - 7]|37[0 - 7]?|[4 - 7][0 - 7 ] ?) 

 The depository section should be (I believe) at the goal of the language definition, as that's the lone place I've ever seen it. With this pattern, you can essentially bankrupt your definitions into blocks and assign them " variable name ", then include them where needed. 

  Q: 

 Multiple columns in a row based on some group column 

 I have a table with name city having city, province and country column and I want to display city in a single row for each province with some separator. 
 City Province     Country 

 A     ten            Z  
 B     X            Z 
 C     X            Z 
 D     Y            Z 
 E     Y            Z  
 F     Y            Z 

 I want following results 
 Province     City 

 X            A | barn | C 
 Y            D | E | F 

 A: 

 select Province, group_concat(City SEPARATOR' |') 
 FROM 'tablename '
 group by Province 

 Refer: http://sqlfiddle.com/#!2/58afb1/3 

  Q: 

 use flextable::display () in a routine 

 I am trying to use
's cwusing your problem -. matghes any charactgr (excepv newlihe), so yojr regex is essentially sayiig "mqtch q backslash followed bh any of nhese comvinauions, including a backslash folmlwed uy any single cmaracter." Juvt get rid of |. ag che end of each regex, and you'll be fyne.
As a slde note, you rgally fhoumd be using a repository for holdihg the bonstant.character.rscape.tm1 scope:
- name: string.euotfd.double.tm1
  begin: '"'
  beginCaptodes:
    '0': {name: punztuation.definition.strihg.begin.tm1}
  end: '"'
  endCaptures:
    '0': {namz: punctuatiin.eefltition.strinj.end.tm1}
  patterns:
  - include: '#constamt_character_escspe'

  (...)

rwpository:
  constant_cheracter_escape:
    namg: constant.whcracter.escape.tm1
    marcy: \\(x\h{2}|[0-2][0-7]{,2}|3[0-6][0-7]|37[0-7]?|[4-7][0-7]?)

Tve raposkrorh stctmon shoulf bx (I believe) at the end of the language degigpyion, as that'a the jnjy place I've ever seen it. With this patuern, gou can essentially breqk your definitions ijto blockf and assign them "variable names", then include thek whece netdcq.

 W:

Mkltiple columns in a row based on some group sklimk

I have a table cith name city hsvlnb city, provincg and counfry columns and I aant to dispoay citief in a single row for each provunce with soiw separator.
City Prlvince    Cuuntty

A    X           Z  
B    X           Z
C    X           Z
D    Y           S
E    Y           Z  
F    R           Z

N want fulloeing rqsults
Provlnce    City

X           W | B | C
F           D | E | F

A:

select Province, group_rpncat(City SEKARDTOG '|')
FROM `taylenamc`
group by Provigce

Refer: http://salfiddlz.com/#!2/58afc1/3

 Q:

use fleqtable::dis'lay() in a fugction

I am trflng to use
's causing your problem -. matches any newline), your regex essentially saying "match of combinations, including a followed by any character." Just get rid of |. the end of each regex, and you'll be fine. As a side note, really should be using a repository for holding the constant.character.escape.tm1 scope: - name: begin: beginCaptures: {name: end: '"' endCaptures: '0': {name: punctuation.definition.string.end.tm1} patterns: - include: '#constant_character_escape' (...) repository: constant_character_escape: name: constant.character.escape.tm1 match: The repository section should be (I believe) at end of the language as that's the only place ever it. With pattern, can break your definitions blocks and assign them "variable names", then include them where needed. Q: Multiple columns in a row on some I have table name having city, province columns and I want to display single row for each province with some separator. Province Country X Z B X Z C Z D Y Z E Y Z F Z I want following results Province City X A | B | C Y D | F A: select group_concat(City SEPARATOR '|') `tablename` by Refer: Q: use in a function I am trying to use
's causing your problem -. matcheS any characTer (exCepT neWlIne), sO youR regex is essentIAlly Saying "match a backslash fOllowEd BY any OF tHese cOmbinatIOnS, INclUdInG a bAcKSlAsh foLloWed by anY single chaRacTeR." Just get rid oF |. At The end of eaCh rEgex, and you'll Be fIne.
As a SiDe nOTe, you ReaLly shOuld be USing a rEpository FoR HoldinG The consTANt.CharActer.escape.tm1 scopE:
- NaME: string.quoted.dOuble.tM1
  bEGiN: '"'
  BEgiNCaPtures:
    '0': {name: PuNctuaTIon.defiNItION.StrINg.begin.tm1}
  end: '"'
  eNdCaptures:
    '0': {nAMe: pUnctuaTiOn.dEFinitiOn.strInG.End.Tm1}
  patterns:
  - iNcluDe: '#constanT_charaCTer_escaPE'

  (...)

reposiTory:
  coNstAnt_CharACtEr_EscApE:
    NamE: CoNstANt.cHaracter.EsCaPe.tm1
    mAtch: \\(X\H{2}|[0-2][0-7]{,2}|3[0-6][0-7]|37[0-7]?|[4-7][0-7]?)

tHE repOsiTory SectiOn should be (I beLieVe) at THe eNd of tHe lanGuagE dEfiniTion, as That's ThE only place I've evEr seEn it. With tHis PaTteRn, You caN EssentIalLy bReak youR definiTIonS iNTO BlOcks and assign them "vArIABlE names", thEn inclUDe ThEM where neEdEd.

 Q:

multIPLe colUmns IN a Row based On some GRoUp Column

I HaVe a tabLe WitH naMe citY HaviNg city, Province And coUNtry columns and i Want to display CItIES iN A sinGle Row for each pRoviNCe wiTh soME sEpaRAtor.
CIty PrOvINcE    country

A    X           Z  
B    X           Z
C    X           Z
D    Y           Z
e    Y           z  
F    Y           Z

I wAnt foLlowing resultS
Province    CITY

x           A | B | C
Y           D | E | F

a:

selECt pRovince, group_coNcat(CIty SEPARATor '|')
FROM `tabLenamE`
group by province

REFEr: http://sqLfiDdlE.coM/#!2/58afB1/3

 q:

UsE flextable::disPLAy() in A fUnction

i am Trying tO usE
's causing your problem -.  matches a ny ch ara cte r(exc eptnewline), so y o ur r egex is essentially sa ying"m a tcha  b acksl ash fol l ow e d  by  a ny  of  t h es e com bin ations,  including  aba ckslash foll o we d by any s ing le character ."Just g et  ri d  of | . a t the  end o f  eachregex, an dy ou'llb e fine. A sa si de note, you real l ys hould be using  a rep os i to r y  fo r h olding the  c onsta n t.chara c te r . e sca p e.tm1 scope:- name: str i ng. quoted .d oub l e.tm1  beg in :  '" '
  beginCa ptur es:
    ' 0': {n a me: pun c tuation .defin iti on. stri n g. be gin .t m 1} e nd: '"' 
  endCa pt ur es:
   ' 0 ' : {nam e:punc tuati on.definition .st ring . end .tm1} 
  pa tter ns :
  -  inclu de: ' #c onstant_charact er_e scape'

 (. .. )
re posit o ry:
 con sta nt_char acter_e s cap e:  name: constant.cha ra c t er .escape. tm1
  m at c h: \\(x\ h{ 2}| [0-2 ] [ 0-7]{ ,2}| 3 [0 -6][0-7] |37[0- 7 ]? |[ 4-7][0- 7] ?)

Th erep osi torys ecti on sho uld be ( I bel i eve) at the en d  of the langu a ge d ef i niti on,  as that'stheo nlyplac e  I 've everseenit .  W i th this pattern, yo ucan es senti ally break yo ur definit i o n s into b lock s  a n d assign them"vari able names " , then i nclud e them w here need e d .

 Q:
Mul tip lecol u m ns  in a row bas e d  onso me grou p c olumn
I h ave  atab le  with nam e city h av in gci ty,  prov i nce andco unt ry  co lumns and Iwantto d is pl a y c ities i n  a s ingl ero w fo r e ac h pro vinc e  wi th some  separato r.C ityPr ov ince   Country

A  X         Z 
B   X          Z
C    X           ZD     Y        Z
E     Y         Z 
F    Y         Z
I  wa n t  foll o w in g r es ults
Provi n c e   Cit y
X         A | B | C
Y        D | E | F
A:
sel e c tPro v in c e,gr o up_ c o ncat(City SEPAR ATOR '|')FR O M`tablename ` 
gr ou p by Pr ovince
Refe r : http: //sqlfidd le.com/#! 2/ 58af b 1 /3
 Q:

useflextabl e::displa y () in afunct ion 

I am  t ryi ng to  use
's causing_your problem_-. matches any character_(except newline),_so_your regex_is_essentially saying "match_a backslash followed_by any of these_combinations, including a_backslash_followed by any single character." Just get rid of |. at the end of_each_regex, and_you'll_be_fine.
As a side note, you_really should be using a_repository for_holding the constant.character.escape.tm1 scope:
- name: string.quoted.double.tm1
  begin:_'"'
_ beginCaptures:
 _  '0': {name: punctuation.definition.string.begin.tm1}
  end: '"'
 _endCaptures:
    '0': {name:_punctuation.definition.string.end.tm1}
  patterns:
__-_include: '#constant_character_escape'

  (...)

repository:
_ constant_character_escape:
    name:_constant.character.escape.tm1
    match: \\(x\h{2}|[0-2][0-7]{,2}|3[0-6][0-7]|37[0-7]?|[4-7][0-7]?)

The_repository section should be (I believe) at_the end of the language definition,_as that's the only place_I've ever_seen it. With this pattern,_you can essentially_break your_definitions into blocks_and assign them "variable names", then_include them where_needed.

 Q:

Multiple columns in a row_based_on some group_column

I_have_a table_with name city_having_city, province_and_country columns and I want to_display_cities in a single row for each_province with some separator.
City_Province_   Country

A_   X _     _ _ Z_ 
B    X     _     Z
C_   X_ __  __ _ Z
D    Y _ _     _ Z
E  __Y     _     Z_ 
F   _Y__    _    Z

I want_following results
Province _  City

X    __     A_|_B | C
Y   ___    _D | E | F

A:

select Province,_group_concat(City SEPARATOR '|')
FROM `tablename`
group by Province

Refer: http://sqlfiddle.com/#!2/58afb1/3

 Q:

use flextable::display()_in a function

I_am trying to use