0

I have the following Pattern

http://abc.com/#!/[0-9a-z]
http://abc.com/#!/search/%23[^.]

So the first pattern identify the URL of a user and second URL identifies search parameters.

I can check whether the pattern belongs to user or search query using Pattern and Matcher class in Java. How can i extract the values of user or search term?

1 Answer 1

2

You should use capturing group. Look at Java regular expressions: capturing groups for details.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.