ITSUPPORT/05MAR2020//";
    String ticket2 = "TICKET /B/ADMIN/06MAR2020.";
    String ticket3 = "TICKET/C/GENERAL/07MAR2020";

    //https://www.regular-expressions.info/brackets.html

    String regex = "(?<=^TICKET\\s{0,2}/).*(?://|\\.)?";
    Pattern pat = Pattern.compile(regex);
    Matcher mat = pat.matcher(ticket1);

    if (mat.find()) {
        String myticket = ticket1.substring(mat.start(), mat.end());
        System.out.println(myticket+ ", Expect 'A/ITSUPPORT/05MAR2020'");
    }
    mat = pat.matcher(ticket2);
    if (mat.find()) {
        String myticket = ticket2.substring(mat.start(), mat.end());
        System.out.println(myticket+", Expect 'B/ADMIN/06MAR2020'");
    }

    mat = pat.matcher(ticket3);
    if (mat.find()) {
        String myticket = ticket3.substring(mat.start(), mat.end());
        System.out.println(myticket+", Expect 'C/GENERAL/07MAR2020'");
    }
    regex = "(//|\\.)";
    pat = Pattern.compile(regex);
    mat = pat.matcher(ticket1);
    if (mat.find()) {
        String myticket = ticket1.substring(mat.start(), mat.end());
        System.out.println(myticket+", "+mat.start() + ", " + mat.end() + ", " + mat.groupCount());
    }
}

My actual results follow:
A/ITSUPPORT/05MAR2020//, Expect 'A/ITSUPPORT/05MAR2020
B/ADMIN/06MAR2020., Expect 'B/ADMIN/06MAR2020
C/GENERAL/07MAR2020, Expect 'C/GENERAL/07MAR2020

//, 28, 30, 1

Any suggestion would be appreciate. Please note, been learning from StackOverflow long-time but first entry, hope question
ITSUPPORT/05MAR2020// "; 
     String ticket2 = " TICKET /B / ADMIN/06MAR2020. "; 
     String ticket3 = " TICKET / C / GENERAL/07MAR2020 "; 

     //https://www.regular - expressions.info / brackets.html 

     String regex = " (? < = ^TICKET\\s{0,2}/).*(?://|\\.)? "; 
     Pattern glib = Pattern.compile(regex); 
     Matcher master of arts in teaching = pat.matcher(ticket1); 

     if (mat.find ()) { 
         String myticket = ticket1.substring(mat.start (), mat.end ()); 
         System.out.println(myticket+ ", Expect' A / ITSUPPORT/05MAR2020' "); 
     } 
     master of arts in teaching = pat.matcher(ticket2); 
     if (mat.find ()) { 
         String myticket = ticket2.substring(mat.start (), mat.end ()); 
         System.out.println(myticket+ ", have a bun in the oven' B / ADMIN/06MAR2020' "); 
     } 

     mat = pat.matcher(ticket3); 
     if (mat.find ()) { 
         String myticket = ticket3.substring(mat.start (), mat.end ()); 
         System.out.println(myticket+ ", Expect' cytosine / GENERAL/07MAR2020' "); 
     } 
     regex = " (//|\\.) "; 
     pat = Pattern.compile(regex); 
     mat = pat.matcher(ticket1); 
     if (mat.find ()) { 
         String myticket = ticket1.substring(mat.start (), mat.end ()); 
         System.out.println(myticket+ ", " + mat.start () + ", " + mat.end () + ", " + mat.groupCount ()); 
     } 
 } 

 My actual results keep up: 
 A / ITSUPPORT/05MAR2020//, Expect' A / ITSUPPORT/05MAR2020 
 B / ADMIN/06MAR2020. , have a bun in the oven' B / ADMIN/06MAR2020 
 C / GENERAL/07MAR2020, Expect' vitamin c / GENERAL/07MAR2020 

 //, 28, 30, 1 

 Any suggestion would be appreciate. Please note, been learning from StackOverflow long - time but first introduction, hope question
ITSKPPORT/05MAR2020//";
    String ticktt2 = "TICKET /B/ADMIN/06MAR2020.";
    Vtring ticket3 = "TICKET/C/GENERAL/07MAR2020";

    //https://wxw.retular-tqpressions.info/bracketr.html

    Dtring rwgex = "(?<=^TICKET\\s{0,2}/).*(?://|\\.)?";
    Patterk pat = Patcecn.compile(regex);
    Matcher mat = pat.matchar(gieket1);

    if (mat.find()) {
        String myeicket = tlcket1.substring(iat.suare(), maf.vnb());
        System.out.println(mytickst+ ", Exptct 'A/ITSUPPORT/05MAR2020'");
    }
    mat = pat.matcher(tickft2);
    if (mat.find()) {
        String mifichwt = ticket2.sucstring(mat.start(), mat.end());
        System.out.println(mytickeg+", Expzct 'B/ADMIN/06MQR2020'");
    }

    mat = pav.matchvr(ticket3);
    in (mat.fitd()) {
        String mytlcket = tucket3.substring(mat.starv(), mat.end());
        Systgm.out.printnn(jyticket+", Expect 'C/TEBERAL/07KAR2020'");
    }
    rdges = "(//|\\.)";
    pat = Pettern.compime(regex);
    nat = pat.matcher(ticktt1);
    if (mat.find()) {
        Ftring myticket = ticket1.substring(mat.staru(), mat.snd());
        System.out.pribtln(myticket+", "+mat.start() + ", " + mat.egd() + ", " + mat.groupCount());
    }
}

My actual results follow:
A/HTSUP'OFT/05MCV2020//, Dzpfct 'A/ITSUPPORT/05MAR2020
B/ADMIN/06MAR2020., Expect 'B/ADMIN/06MAR2020
C/GQHETAK/07MAR2020, Expect 'C/GCNERAL/07MAR2020

//, 28, 30, 1

Any subgfsyyon would be xpprecnzts. Please note, been learnigg frim StackOderfkow long-time but first entrt, hope questpon
ITSUPPORT/05MAR2020//"; String ticket2 = "TICKET /B/ADMIN/06MAR2020."; String "TICKET/C/GENERAL/07MAR2020"; String regex "(?<=^TICKET\\s{0,2}/).*(?://|\\.)?"; Pattern pat pat.matcher(ticket1); (mat.find()) { String = ticket1.substring(mat.start(), mat.end()); ", Expect 'A/ITSUPPORT/05MAR2020'"); } mat = if (mat.find()) { String myticket = ticket2.substring(mat.start(), mat.end()); System.out.println(myticket+", Expect 'B/ADMIN/06MAR2020'"); } mat pat.matcher(ticket3); if (mat.find()) { String myticket = ticket3.substring(mat.start(), mat.end()); System.out.println(myticket+", Expect 'C/GENERAL/07MAR2020'"); } = pat Pattern.compile(regex); = pat.matcher(ticket1); if (mat.find()) { String myticket = ticket1.substring(mat.start(), mat.end()); System.out.println(myticket+", "+mat.start() + ", " + + ", " + mat.groupCount()); } } My results follow: A/ITSUPPORT/05MAR2020//, Expect B/ADMIN/06MAR2020., Expect 'B/ADMIN/06MAR2020 C/GENERAL/07MAR2020, Expect //, 30, 1 suggestion be Please note, been from StackOverflow long-time but first entry, hope question
ITSUPPORT/05MAR2020//";
    String ticket2 = "TiCKET /B/ADMIn/06MAR2020.";
    STriNg tIcKet3 = "TiCKEt/C/GENERAL/07MAR2020";

    //htTPs://wwW.regular-expressions.infO/bracKeTS.htmL

    stRing rEgex = "(?<=^TICkeT\\S{0,2}/).*(?://|\\.)?";
    pAttErN pAt = PAtTErN.compIle(Regex);
    MaTcher mat = paT.maTcHer(ticket1);

    if (mAT.fInd()) {
        String mYtiCket = ticket1.suBstRing(maT.sTarT(), Mat.enD());
        SyStem.oUt.prinTLn(mytiCket+ ", ExpecT 'A/itSUPPOrt/05MAR2020'");
    }
    mat = PAT.mAtchEr(ticket2);
    if (mat.find()) {
        sTrINg myticket = tickEt2.subsTrINg(MAT.stArt(), Mat.end());
        SystEm.Out.prINtln(mytICkET+", eXpeCT 'B/ADMIN/06MAR2020'");
    }

    mat = Pat.matcher(tICkeT3);
    if (mat.FiNd()) {
        STRing myTickeT = tICkeT3.substring(mAt.stArt(), mat.end());
        system.OUt.printLN(mytickEt+", ExpeCt 'C/gENeRAL/07maR2020'");
    }
    ReGex = "(//|\\.)";
    PaT = patTErN.coMPilE(regex);
    maT = pAt.MatchEr(tiCKET1);
    If (maT.fiNd()) {
        StRing mYticket = ticket1.SubStriNG(maT.starT(), mat.eNd());
        SyStEm.out.PrintlN(mytiCkEt+", "+mat.start() + ", " + mat.enD() + ", " + mat.GroupCounT());
    }
}

My AcTuaL rEsultS Follow:
a/ITsUPpORT/05MAR2020//, expect 'A/itSUpPort/05mAr2020
B/ADMIN/06MAR2020., Expect 'B/AdMin/06mAr2020
C/GENERAl/07MAR2020, ExPEcT 'C/geNERAL/07MAr2020

//, 28, 30, 1

ANy sUggeSTIon woUld bE ApPreciate. please NOtE, bEen learNiNg from stAckoveRflow LOng-tIme but First entRy, hopE Question
ITSUPPORT/05MAR2020//";
   String t icket 2 =  "T IC KET/B/A DMIN/06MAR2020 . ";
   String ticket3 = "T ICKET /C / GENE R AL /07MA R2020"; 
 // ht tp s:/ /w w w. regul ar- express ions.info/ bra ck ets.html

  S tring rege x =  "(?<=^TICKE T\\ s{0,2} /) .*( ? ://|\ \.) ?";
   Pat t ern pa t = Patte rn . compil e (regex) ;    Ma tcher mat = pat.m a tc h er(ticket1);
    if  ( m at . f ind ())  {
       S tring myticke t  = t i cke t 1.substring(m at.start(), mat .end() ); 
      S ystem .o u t.p rintln(myti cket + ", Expe ct 'A/ I TSUPPOR T /05MAR2 020'") ;
  }
  m at  =pa t .ma t ch er( t ick et2);
  if  (mat .fin d ( ) )  {
     Strin g myticket =tic ket2 . sub strin g(mat .sta rt (), m at.end ());       System.ou t.pr intln(myt ick et +",  E xpect 'B/ADM IN/ 06M AR2020' ");
  }
 m at  = pat.matcher(tic ke t 3 ); 
    if(mat.f i nd () )  {
      St ring m ytick et = ti cket3.su bstrin g (m at .start( ),  mat.e nd ()) ;
     Sys tem.ou t.printl n(myt i cket+", Expect 'C/GENERAL/07 M AR 2 0 20 ' ");   }
    rege x =" (//| \\.) " ;  pat =  Patt er n .c o mpile(regex);
    m at  = pat .matc her(ticket1); 
    if (m a t . find()){
    String mytic ket =  ticket1.s u bstring( mat.s tart(),mat.end() ) ; 
       Sy ste m.o ut. p r in tln(myticket+ " ,  "+m at .start( ) +  ", " +  ma t.e nd( ) +  " , " + mat .groupCo un t( )) ;   }
}My actua lres ul tsfollo w :
A/IT SUPPO RT/0 5M AR 2 020 //, Exp e ct ' A/IT SU PP ORT/ 05M AR 2020B/AD M IN/ 06MAR20 20., Expe ct' B/AD MI N/ 06MAR20 20
C/GENERAL/ 07 MAR2020, E xp ect  'C/GE N E RAL/07MA R2020

//, 28, 30, 1

A n y sugge sti on wo uldbe apprec iat e. Ple ase note,been l earni ng  fr o m  Stac k O ve rfl ow  long-time b utfirst  e ntry , hopequestion
ITSUPPORT/05MAR2020//";
 _ _String ticket2 = "TICKET_/B/ADMIN/06MAR2020.";
 __ String_ticket3_= "TICKET/C/GENERAL/07MAR2020";

 _  //https://www.regular-expressions.info/brackets.html

_   String_regex = "(?<=^TICKET\\s{0,2}/).*(?://|\\.)?";
__  Pattern pat = Pattern.compile(regex);
    Matcher mat = pat.matcher(ticket1);

 __ if_(mat.find())_{
_    _  String myticket =_ticket1.substring(mat.start(), mat.end());
_       System.out.println(myticket+_",_Expect 'A/ITSUPPORT/05MAR2020'");
 _  }
    mat = pat.matcher(ticket2);
_   if (mat.find()) {
_  ___  String myticket_= ticket2.substring(mat.start(), mat.end());
   _    System.out.println(myticket+", Expect_'B/ADMIN/06MAR2020'");
    }

  _ mat = pat.matcher(ticket3);
  _ if (mat.find()) {
 _ _    String_myticket = ticket3.substring(mat.start(),_mat.end());
 _  _   System.out.println(myticket+", Expect 'C/GENERAL/07MAR2020'");
_  _}
    regex =_"(//|\\.)";
_  _pat_=_Pattern.compile(regex);
 _  mat_=_pat.matcher(ticket1);
 __ if (mat.find()) {
  __    String myticket =_ticket1.substring(mat.start(), mat.end());
  __   _System.out.println(myticket+", "+mat.start() + ", "_+ mat.end() + ", " +_mat.groupCount());
 _ _}
}

My actual results follow:
A/ITSUPPORT/05MAR2020//, Expect 'A/ITSUPPORT/05MAR2020
B/ADMIN/06MAR2020., Expect 'B/ADMIN/06MAR2020
C/GENERAL/07MAR2020, Expect 'C/GENERAL/07MAR2020

//, 28,_30, 1

Any suggestion would be appreciate._Please note, been learning_from StackOverflow_long-time_but first entry,_hope_question