{"action":"created","issue":{"url":"https://api.github.com/repos/VerbalExpressions/JavaVerbalExpressions/issues/34","labels_url":"https://api.github.com/repos/VerbalExpressions/JavaVerbalExpressions/issues/34/labels{/name}","comments_url":"https://api.github.com/repos/VerbalExpressions/JavaVerbalExpressions/issues/34/comments","events_url":"https://api.github.com/repos/VerbalExpressions/JavaVerbalExpressions/issues/34/events","html_url":"https://github.com/VerbalExpressions/JavaVerbalExpressions/pull/34","id":56319730,"number":34,"title":"maybe() method now accepts a builder as parameter","user":{"login":"Tavio","id":1283774,"avatar_url":"https://avatars.githubusercontent.com/u/1283774?v=3","gravatar_id":"","url":"https://api.github.com/users/Tavio","html_url":"https://github.com/Tavio","followers_url":"https://api.github.com/users/Tavio/followers","following_url":"https://api.github.com/users/Tavio/following{/other_user}","gists_url":"https://api.github.com/users/Tavio/gists{/gist_id}","starred_url":"https://api.github.com/users/Tavio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tavio/subscriptions","organizations_url":"https://api.github.com/users/Tavio/orgs","repos_url":"https://api.github.com/users/Tavio/repos","events_url":"https://api.github.com/users/Tavio/events{/privacy}","received_events_url":"https://api.github.com/users/Tavio/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-02-03T01:16:57Z","updated_at":"2015-02-03T08:49:19Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/VerbalExpressions/JavaVerbalExpressions/pulls/34","html_url":"https://github.com/VerbalExpressions/JavaVerbalExpressions/pull/34","diff_url":"https://github.com/VerbalExpressions/JavaVerbalExpressions/pull/34.diff","patch_url":"https://github.com/VerbalExpressions/JavaVerbalExpressions/pull/34.patch"},"body":"I propose that all Builder methods which accept a string as parameter should have another version that accepts another Builder as parameter. This would allow users to break their expressions into smaller expressions, thus making their code more readable and maintainable. I built a test showing an example of an expression built with the oneOf() method being passed as the parameter for the maybe() method (with the current code this would not be possible, as the contents of the oneOf() expression would all be escaped with \\\\).\r\n\r\nIf you guys think this is a good idea, I will open another PR implementing the same idea for all other methods of the Builder class."},"comment":{"url":"https://api.github.com/repos/VerbalExpressions/JavaVerbalExpressions/issues/comments/72614324","html_url":"https://github.com/VerbalExpressions/JavaVerbalExpressions/pull/34#issuecomment-72614324","issue_url":"https://api.github.com/repos/VerbalExpressions/JavaVerbalExpressions/issues/34","id":72614324,"user":{"login":"lanwen","id":1964214,"avatar_url":"https://avatars.githubusercontent.com/u/1964214?v=3","gravatar_id":"","url":"https://api.github.com/users/lanwen","html_url":"https://github.com/lanwen","followers_url":"https://api.github.com/users/lanwen/followers","following_url":"https://api.github.com/users/lanwen/following{/other_user}","gists_url":"https://api.github.com/users/lanwen/gists{/gist_id}","starred_url":"https://api.github.com/users/lanwen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lanwen/subscriptions","organizations_url":"https://api.github.com/users/lanwen/orgs","repos_url":"https://api.github.com/users/lanwen/repos","events_url":"https://api.github.com/users/lanwen/events{/privacy}","received_events_url":"https://api.github.com/users/lanwen/received_events","type":"User","site_admin":false},"created_at":"2015-02-03T08:49:19Z","updated_at":"2015-02-03T08:49:19Z","body":"think no need other methods - any of regex can be inserted with help of `add(builder)` method. Its overkill to implement each method to do so"}}