I need a regular expression for javascript that will get "jones.com/ca
" from "Hello we are jones.com/ca in Tampa
". The "jones.com/ca
" could be any web url extension (example: .net, .co, .gov, etc), and any name. So the regular expression needs to find all instances of say ".com
" and all the text to the last white space or beginning of line and to the last white space or end of line (minus any ending punctuation).
Right now I have as an example line: "jones.com/ca some text
", using a javascript regular expression of: "\\(.+?^\\s).com?([^\\s]+)?\\
", and all I get is ".com/ca
" as the output.