regex - Accessing a specific part of a line with regular expressions -


i'm having trouble figuring out how regular expressions, want this.

basically have file , i'm reading line line , each line in file looks this.

"hello data relatively useless 237 12375"

now want test see if value before last value within range , if print out first word in line.

my main issue is there way access word before last word in line?

assuming quotes not there , last 2 pieces digits like:

(\d+)\s(?:\d+)

ie. match number of digits long followed space , other digits

try


Comments

Popular posts from this blog

php - Passing multiple values in a url using checkbox -

compilation - PHP install fails on Ubuntu 14 (make: *** [sapi/cli/php] Error 1) PHP 5.6.20 -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -