Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Gherkin: Match range of characters

‘-‘ is used to specify the range of characters.

For Example
[a-f,A-F,0-9]{4}
Above Regular Expression is used to check for 32bit hexa decimal strings.

([1-9][0-9]*)
Above Regular expression match a positive integer.
@When("I purchased for \\$([1-9][0-9]*)")
public void i_purchased_for_$(int arg1) throws Exception {
System.out.println("Purchased for " + arg1 + "$");
}



Previous                                                 Next                                                 Home


This post first appeared on Java Tutorial : Blog To Learn Java Programming, please read the originial post: here

Share the post

Gherkin: Match range of characters

×

Subscribe to Java Tutorial : Blog To Learn Java Programming

Get updates delivered right to your inbox!

Thank you for your subscription

×