|
| 1 | +package com.jaspersoft.jasperserver.jaxrs.client.apiadapters.core; |
| 2 | + |
| 3 | +/** |
| 4 | + * @author Tetiana Iefimenko |
| 5 | + */ |
| 6 | +public class TMP { |
| 7 | + public static void main(String[] args) { |
| 8 | + |
| 9 | + String s = "[^?]+\\?([^&]*&)*error=1(&[^&]*)*$"; |
| 10 | + System.out.println("http://localhost:8080/jasperserver-pro/login.html?error=1".matches(s)); |
| 11 | + System.out.println("http://localhost:8080/jasperserver-pro/login.html?error=2&error=1".matches(s)); |
| 12 | + System.out.println("http://localhost:8080/jasperserver-pro/login.html?error=1&error=2".matches(s)); |
| 13 | + System.out.println("http://jasperserver.com/jasperserver-pro/login.html?error=1&error=2".matches(s)); |
| 14 | + System.out.println("http://jasperserver.com/jasperserver-pro/login.html?error=1&".matches(s)); |
| 15 | + System.out.println("http://jasperserver.com/jasperserver-p&ro/login.html?error=1&".matches(s)); |
| 16 | + System.out.println("http://jasperserver.com/jasperserver-p&ro/login.html?error=1&&".matches(s)); |
| 17 | + System.out.println("http://jasperserver.com/jasperserver-p&ro/login.html?error=1&dfdf?&".matches(s)); |
| 18 | + System.out.println("http://localhost:8080/jasperserver-pro/login.html??&error=1".matches(s)); |
| 19 | + System.out.println("http://localhost:8080/jasperserver-pro/login.html?&error=1".matches(s)); |
| 20 | + System.out.println("http://localhost:8080/jasperserver-pr&o/login.html?&error=1".matches(s)); |
| 21 | + System.out.println("http://localhost:8080/jasperserver-pro/login.html?&error=1".matches(s)); |
| 22 | + System.out.println("http://jasperserver.com/jasperserver-p&ro/login.html??&error=1&dfdf?&".matches(s)); |
| 23 | + System.out.println(); |
| 24 | + System.out.println("http://jasperserver.com/jasperserver-p&ro/login.html??error=1&dfdf?&".matches(s)); |
| 25 | + System.out.println("http://localhost:8080/jasperserver-pro/login.html?error=11".matches(s)); |
| 26 | + System.out.println("http://localhost:8080/jasperserver-pro/login.html?rtr&gfgfderror=1".matches(s)); |
| 27 | + System.out.println("http://localhost:8080/jasperserver-pro/login.html?fdhdfh=fbfhb?error=1".matches(s)); |
| 28 | + System.out.println("http://localhost:8080/jasperserver-pro/login.html&error=1".matches(s)); |
| 29 | + } |
| 30 | +} |
0 commit comments