How to add symbols such as † ▲ □ ■ ∞ Ʌ ℑ ⊇ ≥ ◊ etc to Regex?

59 Views Asked by At

I use this extension to my phpbb forum to add tags to my topics: https://www.phpbb.com/customise/db/extension/rh_topic_tags/

It says to add symbols to tags I need to change Regex -but have no idea how to update it.

My current string is:

/^[\- a-z0-9]{3,30}$/i

I want to add following symbols to it: † ▲ ∆ □ ■ ∞ Ʌ ℑ ⊇ ≥ ◊ ≤ ⊆ ℜ § ᄼᄽᄾ ❖

possibly more, is there a way to enable all symbols?

1

There are 1 best solutions below

0
tripleee On

Maybe you could just simplify it to something like

/^\S{3,30}$/

which plainly allows any non-whitespace sequence of the indicated length?

No final i option should be necessary (there are no alphabetics here whose case we can ignore or not) but depending on context, you might want to add u, for Unicode.