Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

renaming anythingBut method name #33

Merged
merged 2 commits into from
Feb 3, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ You can use *SNAPSHOT* dependency with adding to `pom.xml`:
VerbalExpression testRegex = VerbalExpression.regex()
.startOfLine().then("http").maybe("s")
.then("://")
.maybe("www.").anythingButNot(" ")
.maybe("www.").anythingBut(" ")
.endOfLine()
.build();

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ru/lanwen/verbalregex/VerbalExpression.java
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ public Builder anything() {
* @param pValue - the string not to match
* @return this builder
*/
public Builder anythingButNot(final String pValue) {
public Builder anythingBut(final String pValue) {
return this.add("(?:[^" + sanitize(pValue) + "]*)");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public void testAnything() {
public void testAnythingBut() {
VerbalExpression testRegex = new VerbalExpression.Builder()
.startOfLine()
.anythingButNot("w")
.anythingBut("w")
.build();

assertFalse("starts with w", testRegex.testExact("what"));
Expand Down Expand Up @@ -342,7 +342,7 @@ public void testGetText() {
.maybe("s")
.then("://")
.then("www.")
.anythingButNot(" ")
.anythingBut(" ")
.add("com").build();
assertEquals(testRegex.getText(testString), "https://www.google.com");

Expand Down
2 changes: 1 addition & 1 deletion src/test/java/ru/lanwen/verbalregex/RealWorldUnitTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public void testUrl() {
.maybe("s")
.then("://")
.maybe("www.")
.anythingButNot(" ")
.anythingBut(" ")
.endOfLine()
.build();

Expand Down