0

There is a sharepoint url :
http://teamspace.abc.com/sites/ABC/?list=%7bCEE6E6CB-A035-4FF9-Af95-98784D732938%7d

The listID could be various but I only want to allow the above one. Therefore, it shouldn't match:

http://teamspace.abc.com/sites/ABC/?list=%7bDEXXXXxxxx-A035-4FF9-Af95-98784D732938%7d url

Is there any way I can match only if url is the following: http://teamspace.abc.com/sites/ABC/?list=%7bCEE6E6CB-A035-4FF9-Af95-98784D732938%7d"

jetulis
  • 168
  • 1
  • 13

2 Answers2

0

better use == operator (equals() in java and C#)

String http = "http";
String shp = "sharepoint";
String url = "://teamspace.abc.com/sites/ABC/?list=%7bCEE6E6CB-A035-4FF9-Af95-98784D732938%7d";
if(myUrl.equals(http+url) || myUrl.equals(shp+url))
{
    //do what you want
}
example for java
shift66
  • 11,760
  • 13
  • 50
  • 83
0
var url = "(http|sharepoint)://teamspace.abc.com/sites/ABC/?list=%7bCEE6E6CB-A035-4FF9-Af95-98784D732938%7d"

if (listID == url)
Michael Fredrickson
  • 36,839
  • 5
  • 92
  • 109
Lvcky Mercado
  • 93
  • 1
  • 1
  • 4