regex - Regular Expression to select everything before and up to a particular text -


i trying use regular expression find part of string , select string. example if string this/is/just.some/test.txt/some/other, want search .txt , when find select before , .txt.

after executing below regex, answer in first capture.

/^(.*?)\.txt/ 

Comments

Popular posts from this blog

Line ending issue with Mercurial or Visual Studio -

java - Jtable duplicate Rows -

java - Run a .jar on Heroku -