-
-
Notifications
You must be signed in to change notification settings - Fork 401
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
String.search(regexp) #117
Comments
Hi! I would like to work on this if that's alright? |
@Baev1 sure ive assigned to you |
Thank you @jasonwilliams! |
Hi, I am learning rust and I work on string.match(regexp) #114 , and it seems as we need a function that extracts a regexp literal in string.rs. Like here: https://github.com/jasonwilliams/boa/blob/5df34762e64558c9c1042219ce1baee05777bf1d/src/lib/js/regexp.rs#L55-L73 I included those lines directly in my match implementation #131. Having it as a separate private function would help us both and also #115 , if using the RegExp struct is not allowed. A question of my own would be, how can we support: string.match(new RegExp(...))? |
Hey guys, I used a little bit different approach. Please have a look at jasonwilliams#138. |
Yeah, We need a common way to extract regex's. Your PR also in a way answers my question. But I am not sure about implementing the actual functionality in |
not had chance to look at this yet, but will do |
Hey @Baev1 im trying to follow, what do you mean the RegEp struct itself is private and this its impossible? I think it should be possible to use If the arg being passed in is already a RegExp, then you could just use ctx to call exec on it |
مكررة مكررة من # |
Hey, I'd like to pick this issue up if it's still valid! |
I'll be removing the assignment, if @flix477 still wants to finish their PR we can give back the assignment. |
This was fixed in #1314 |
search
function would need to be added to the string object here:https://github.com/jasonwilliams/boa/blob/master/src/lib/js/string.rs
It would be very similar to:
https://github.com/jasonwilliams/boa/blob/master/src/lib/js/regexp.rs#L212-L251
Spec:
https://tc39.es/ecma262/#sec-string.prototype.search
Debugging:
https://github.com/jasonwilliams/boa/blob/master/docs/debugging.md
The text was updated successfully, but these errors were encountered: