java - Match two urls with regular expressions -


I have a list of URLs and I use regular expressions with those URLs

 Http://investor.somehost.com/*  

Here * means anything after this or you can say that this is a wildcard ...

  String href = url.getURL ();   

Here all the URLs in the href are included.

Looks like the URL ( http://investor.somehost.com/* ) in Firstentry

then how can I compare it with Firstentry? Like if this URL starts with ...

If you decide Want a string to start with a special prefix, then use it.

Example:

  string href = "http://google.com/mail"; If (href.startsWith ("http://google.com")) {// ... content}}    

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -