As others have said, there is no equivalent, but you can achieve the && effect using a forecast. Conversion:
[classA&&classB]
becomes:
(?=classA)classB
For example, this is in Java:
[az&&[^bc]]
has the same behavior as this:
(?=[az])[^bc]
which is fully supported in JavaScript. I do not know the relative performance of the two forms (in machines like Java and Ruby that support both).
Since the && operator is commutative, you can always use both sides for the (positive or negative) part in front.
The intersection of a class with a negative class can also be implemented with a negative forecast. Thus, the above example could also be converted to:
(?![bc])[az]
Ted hopp
source share