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

'exactly' instead of 'find' ? #2

Open
colllin opened this issue Aug 5, 2013 · 6 comments
Open

'exactly' instead of 'find' ? #2

colllin opened this issue Aug 5, 2013 · 6 comments

Comments

@colllin
Copy link

colllin commented Aug 5, 2013

Just a thought. Haven't even used this library yet but I'm looking forward to it 👍

@ryan-endacott
Copy link
Owner

Thanks! I hope you like it!

I like exactly. I was also considering next. Thoughts?

@colllin
Copy link
Author

colllin commented Aug 6, 2013

next is another good one. a great synonym for then from the original
library. isn't next a reserved word in ruby though?

On Mon, Aug 5, 2013 at 5:08 PM, Ryan Endacott [email protected]:

Thanks! I hope you like it!

I like exactly. I was also considering next. Thoughts?


Reply to this email directly or view it on GitHubhttps://github.com//issues/2#issuecomment-22147525
.

@ryan-endacott
Copy link
Owner

Oh, oops. You're correct. It's reserved. Maybe match? I think I probably prefer exactly though.

@colllin
Copy link
Author

colllin commented Aug 6, 2013

match is cool too. Or maybe expect? then_exactly ? Now that you mention match, I think that's my favorite.

If I'm trying to create the regex /http/, when I read exactly 'http', that makes me picture a regex more like /^http$/, you know? As in "This string is exactly 'http'." Compared to "This string matches 'http'."

Anyway, I'm bowing out at this point. Changing the syntax is not a decision to take lightly. I suppose you could do both -- keep find as an alias for match so no one gets upset.

Thanks for your effort putting this together!

@ryan-endacott
Copy link
Owner

Of course, when implementing match I ran into another error. Because of the way the DSL is implemented, it overrides the match method on the regex object itself. Know of any way to reorganize it where that wouldn't be an issue? Maybe I can reassign match to call super.match after initialization.

I do plan on keeping the alias though.

You're welcome, I'm glad you like it! Thanks for your help!

@b08x
Copy link

b08x commented Sep 29, 2021

Then >

" Its meaning is very similar to that of following or later, but it has a more formal tone to it and may imply that something not only follows but in some way grows out of or is otherwise closely connected with what precedes.

  • subsequently
  • consequently

This happens after that.

This happens subsequent to that

First do this. After do that.

Do this. Do that.

Suppose or Should might work if the results would always be uncertain in some way:

If this is true, do this.
If this works out, it should do that.

If this happens, then this is suppose to happen
If this happens, suppose this

"your choice in such cases would depend upon whether you want to stress the order of events or the causal relationship between one event and another.


It would help if you were able to describe in sentence form what is happening here:

add("(?:[^#{value}]*)")

Also, standardize might syntactically work better than sanitize. You're not really cleaning anything as much as you are making it works regardless of environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants