java regular expression

Posted by BSingh on Stack Overflow See other posts from Stack Overflow or by BSingh
Published on 2010-06-10T14:18:37Z Indexed on 2010/06/10 14:22 UTC
Read the original article Hit count: 240

Filed under:
|

I am trying to write a regular expression for somethin like

s1 = I am at Boston at Dowtown
s2 = I am at Miami

I am interested in the words after at eg: Boston, Downtown, Miami

I have not been successful in creating a regex for that. Somethin like

> .*? (at \w+)+.*

gives just Boston in s1 (Downtown is missed). it just matches the first "at" Any suggestions

© Stack Overflow or respective owner

Related posts about java

Related posts about regex