Thank you for contacting me. Please note that I live in the GMT+3 time zone - responses might be delayed by this.
This topic has 7 replies, 2 voices, and was last updated 3 years, 8 months ago by Szabi – CodeRevolution.
-
AuthorPosts
-
-
April 4, 2022 at 9:54 pm #4865
Hi there,
I am trying to configure regex which will remove numbers in brackets (including brackets).
Something like:
(4)
(123)
(1, 23)
I tried this regex: ((\d))
And it’s removing numbers but in brackets but not brackets itself.
Can you please help?
Daniel
-
April 5, 2022 at 4:58 am #4866
Hello,
First of all, thank you for your purchase.
Brackets need to be escaped with slashes, as they are Regex operators. So, I suggest you try using:
(\(\d*\))
Also, to match (1, 23), I suggest:
(\([\d\s,]*\))
You can write your Regex expressions with more ease, on this site, where you can also see their matches: https://regexr.com/
Let me know if this helped.
Regards, Szabi – CodeRevolution.
-
April 7, 2022 at 4:17 pm #4888
yep, thanks for your help but for some reason it does not work. Am I doing this right? Please see attached screen.
Attachments:
You must be logged in to view attached files. -
April 7, 2022 at 6:55 pm #4890
Hello,
Interesting, because the Regex seems to be correct.
Can you send me, please, temporary admin login credentials to your WordPress install, so I can check this issue out? Send it, please, to my email address: kisded@yahoo.com
Regards, Szabi – CodeRevolution.
-
April 12, 2022 at 1:42 pm #4908
Hi Szabi,
I just send you Admin credentials on your email.
Dan
-
April 12, 2022 at 4:06 pm #4909
Hello,I checked and the source article was scraping also some invisible HTML tags in the numbers, example:(<hl-trusted-source source=”PubMed Central” rationale=”Highly respected database from the National Institutes of Health”>1</hl-trusted-source>)To match also these extended HTML tags I modified the Regex as follows:(\((?:<hl-trusted-source[\s\S]*?)?[\d\s,]*(?:<\hl-trusted-source>)?\))I applied it to rule ID 0 on your site, please check results.Kind Regards,Szabi – CodeRevolution. -
April 15, 2022 at 7:44 pm #4955
Hi Szabi,
Look like it works! Thanks a lot!
Daniel
-
April 16, 2022 at 3:53 am #4957
I am glad to hear this!
If you enjoy using the plugin, please give it a rating on CodeCanyon, it is really appreciated!
Regards.
-
-
AuthorPosts
The topic ‘RegEx help’ is closed to new replies.