03-27-2020 11:38 AM
@thols wrote:
\!\$abCD will work.
I usually use https://regex101.com to test regexes. It gives direct and clear feedback.
I like using https://rubular.com/ for RegEx testing.
03-29-2020 09:41 PM
Thank you for your idea but in your case, if I don't have the "Plus" + as the format of the expression, nothing can be matched. + ... + is just my example. I would like to match all strings (with some special characters I mentioned above) excluding the strings "inside the double quote"
03-30-2020 12:57 AM
@anhduy92 wrote:
Thank you for your idea but in your case, if I don't have the "Plus" + as the format of the expression, nothing can be matched. + ... + is just my example. I would like to match all strings (with some special characters I mentioned above) excluding the strings "inside the double quote"
Well, here's one way to get everything except what is inside quotes:
It's just what I came up with now but I'm sure there's a simpler way.
03-30-2020 01:50 AM
@thols wrote:
Well, here's one way to get everything except what is inside quotes:
It's just what I came up with now but I'm sure there's a simpler way.
I don't know if it's been improved, but that solution is very slow if the string gets big (it bit me in a project as i started on this job). It's better to send the 'index found' to the shift register and use it for 'start at index'. That way no string needs to be reallocated. 🙂
/Y
03-30-2020 03:01 AM
I did a test, the difference isn't very big nowadays, using index is some 10-20% faster and more consistant, but not a huge thing. 🙂
03-30-2020 03:33 AM
@Yamaeda wrote:...I don't know if it's been improved, but that solution is very slow if the string gets big (it bit me in a project as i started on this job). It's better to send the 'index found' to the shift register and use it for 'start at index'. That way no string needs to be reallocated. 🙂
/Y
Of course, how sloppy of me:
03-30-2020 06:34 AM
@thols wrote:
@Yamaeda wrote:...I don't know if it's been improved, but that solution is very slow if the string gets big (it bit me in a project as i started on this job). It's better to send the 'index found' to the shift register and use it for 'start at index'. That way no string needs to be reallocated. 🙂
/Y
Of course, how sloppy of me:
Shouldn't that shift register be initialized?
03-30-2020 06:46 AM
I think this does the same:
Or, if you just want all quoted strings removed: