i want get to string in a multiline string that content any specific character and i want get to between two specific staring.
i used this regex and this work but if
javascript doesn't support s (dotall) modifier. The only workaround is to use a "catch all" class, like [\s\S] instead of a dot:
s
[\s\S]
regex = new RegExp("\-{2}Head([\\s\\S]*)-{2}\/\Head")
Also note that your expression can be written more concisely using a literal:
regex = /--Head([\s\S]*)--\/Head/