I am looking for an regular expression to match the file name. I got an array which contains file names like:
log4perl.appender1996:06:58:12.General_Information.ErrorLog log4perl_LogicModules.appender1996:07:56:12CSS.General_Information_hel +p.ErrorLog
log4perl.Edition1998:06:56:12.General_Information.ErrorLog log4perl_Eventsource.Edition1998:06:56:12CSS.General_Information-colle +ctor_1.ErrorLog
log4perl.Advanced1999:06:56:12.General_Information.ErrorLog log4perl.Advanced1999:06:56:12CSS.General_Information-collector-2.Erro +rLog
So if i take an example for below files
log4perl.Advanced1999:06:56:12.General_Information.ErrorLog log4perl.Advanced1999:06:56:12CSS.General_Information-collector-2.Erro +rLog
I need an regular expression which matches the format of my files and removes "CSS" after string "Advanced1999:06:56:12CSS" in second file and keep both the files in array.
File name format : <(alphanumericString,_)>.<(alphanumericUniqueIdentifier,.)>.<(alphanumericString2,_,-)>.ErrorLog<(alphanumericUniqueIdentifier,.)> is appended with constant "CSS" sometimes with alphanumericUniqueIdentifier
So after removing CSS in need below files in array
Thanks.log4perl.Advanced1999:06:56:12.General_Information.ErrorLog log4perl.Advanced1999:06:56:12.General_Information-collector-2.ErrorLo +g
In reply to Perl file name parsing - Regular expression by rinkish85
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |