I think you want '[\w+] (\d+) .+' (w/o quotes). [\w+] - \w is a character class that matches any word character (alphanumeric plus underscores). '+' changes it from matching a single character to matching one or more characters.
(\d+) - \d is a character class that matches digits. '+' makes it match one or more digits. .+ - '.' matches any non-newline character. '+' makes it match one or more of those characters. If you specifically don't want to allow digits in the first word, you can change '[\w+]' to '[\w^\d]' I'm no expert at regex, but I've been learning a lot about it lately and I'm reasonably sure this'll do the trick. PAULO LOURENCO (RE-ESI-Workflow) wrote: > > Greetings, > > > > I know this is going to look like a basic question, which I apologize > for in advance, but I'm having problems with a simple regular > expression. > > Basically I want to extract a number that comes after a word and that is > followed by a space and something else. Ex: > > Word 123 - more stuff > > From the previous sentence, what I want o extract is the 123, regardless > of what comes after ('-', '.', etc) knowing that the number comes always > after a word. > > > > Thanks in advance! > > > > > -- View this message in context: http://www.nabble.com/regular-expression-extractor-tp21074258p21086078.html Sent from the JMeter - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: jmeter-user-unsubscr...@jakarta.apache.org For additional commands, e-mail: jmeter-user-h...@jakarta.apache.org