Skip to content

Tag: regex

regex to detect trailing comma and/or space separated numbers [closed]

Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 1 year ago. Improve this question I need a regex to detect and match some values like that: but values like f…

Regex pluck parts too, not whole string

This is my input content: and this is regex example: This is the $matches content: Not bad, but I’d like somehow to pick “add_to_cart” and “product_name” as well. I can do it with explode() function, but wonder if there is a way to do this by regex only once. Also, I wonder if it…

Regex for Group Links For WhatsApp URL [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. This question does not appear to be about programming within the scope defined in the help center. Closed 1 year ago. Improve this question I am using the following regex for validating Group Links For WhatsA…

PHP regular expression start and end with given number [closed]

Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago. Improve this question I have a string like this 202009170439051466017152d0bd457094b54f32eb029c4e…

PHP 7.4 PCRE2 newline character warning

Been testing a codebase migration from 7.3 to 7.4, and the only thing that affected us is the PCRE update under PHP. Currently this regex: /(>)([Rsvh]*)((&|#)?nbsp;|(&|#)nbsp)*([Rsvh]*)(<)/ Throws a nasty warning: Compilation failed: escape sequence is invalid in character class at offset 7 And …