Member Avatar for saravind84

Hi,

Can you help me in identifiying the meaning of this reqular expression?
public static final Pattern pattern = Pattern.compile("^.(?=.{8,})(?=.[a-z])(?=.[A-Z])(?=.[\W_]).*$");

Thanks,
Aravind

Hi,

go to http://regexr.com/3eb88 and mousehover the components of the expression (or hit the Explain tab), it will explain the meaning of each block. If you have some sample data you can paste it in their form and see how it is applied.

For example, try to change [\W_] to [\w] to see what is parsed.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.