The problem is that, because of the very long string length, the gsub
return a regexp error indicating that the regular expression is too
long.
Ahmad, it’s easier for us if you present a complete example along with
the concrete error (e.g. exception with stack trace).
A general remark: it is very uncommon to have a regular expression whose
text is 80k in size. So you probably rather want a different approach
but which one is difficult to tell without having more input.
Kind regards
robert
Yup. I know. By showing the code, I just really don’ know where to
start.
But after looking at candlerb’s option, it is what I really needed, the
starting and ending index of the string really help marking the certain
content in the string.
I can go on from that.
Thanks so much for sharing
The problem is that, because of the very long string length, the gsub
return a regexp error indicating that the regular expression is too
long.
Ahmad, it’s easier for us if you present a complete example along with
the concrete error (e.g. exception with stack trace).
A general remark: it is very uncommon to have a regular expression whose
text is 80k in size. So you probably rather want a different approach
but which one is difficult to tell without having more input.
Kind regards
robert
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.