Capture before the special character text


I want capture only text before the special character content as below


  1. PRIasdadNTEsdaaD BLISsadadasdTER FOIL-[208dasdasd/0.asdassdasd025mm][COMBIART-DT][PdasdasdFSdsadCM, WdsaffdsHfdsO][KarnatakaRanchiSurayGoa][ENG/FRN][REVD FOR INCLUSION NUMBER]PsdsadHsdfsdARasdasdMsdadA CODdasdE: 20dassadsada14]

  2. PRIasdadNTEsdaaD BLISsadadasdTER FOIL[208dasdasd/0.asdassdasd025mm][COMBIART-DT][PdasdasdFSdsadCM, WdsaffdsHfdsO][KarnatakaRanchiSurayGoa][ENG/FRN][REVBER]PsdsadHsdfsdARasdasdMsdadA CODdasdE: 20dassadsada14]


  1. PRIasdadNTEsdaaD BLISsadadasdTER FOIL
  2. PRIasdadNTEsdaaD BLISsadadasdTER FOIL

Please help

You want the output till the word FOIL ?

yes but always its not foil i need before the special characters like (){}[]- anything it might be, before the special character whatever text its their i need that

hope this regular expression would help you…

Regex: .*?(?=[^\w\s])


take a message box and paste this
System.Text.RegularExpressions.Regex.Matches(“give your input varible here without double qoutes”, “.*?(?=[^\w\s])”)(0).ToString