regex - Regular Expressions two strings -




i not understand regular expressions. hope can me.

i have in file date of files

aug 15:07 file1.txt jul 15:04 file2.txt aug 15:05 file3.txt aug 15:05 file4.txt aug 2016 file5.txt jul 15:09 file6.txt 

i want files start 'aug' , have time (:)

/^aug :/ 

but doing shows me files without exception

this filenames starting 'aug :' not want.

try /^aug [0-9]{1,2}:/ instead. looks filenames which:

  • start 'aug '
  • then 1 or 2 digits
  • then colon

also, bash command you're running ?

(you can test regex @ regex101.com, it's website or ;-) )





wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -