/
(?#
# Adapted for PHP by Paul Buonopane of NamePros https://www.namepros.com/
# Based heavily on the following works:
# - https://manishearth.github.io/blog/2018/02/15/picking-apart-the-crashing-ios-string/
# - https://github.com/hackbunny/viramarama
#
# This PHP regex will match any string that contains Indic character
# combinations known to crash many iOS applications as of 11.2.5 and certain
# macOS combinations as of 10.13.3.
#
# IMPORTANT: This will only work if you use the `x` and `u` modifiers.
# Example: "{regex-goes-here}xu"
#
# COMPATIBILITY: While PHP does use PCRE, the `u` modifier isn't technically
# Perl-compatible. For this to work without the `u` modifier,
# the regex would need to be adapted to use | instead of [],
# as all of these characters are multibyte in all popular web
# encodings, e.g. UTF-8.
#
# Tracked By: rdar://37458268
# https://openradar.appspot.com/37458268
# Date Originated: 2018-02-12
# CVE ID: Unknown as of writing
#)
(?(DEFINE)
(?<zwnj> (?# You can't see me, but I'm here!))
(?<devanagari_virama> ्)
(?<devanagari_consonants> [कखगघङहचछजझञयशटठडढणरषतथदधनलसपफबभमव])
(?<devanagari_sj_consonants>