Java Nashorn Javascript Library toRegExp(String source, String optionsString)

Here you can find the source of toRegExp(String source, String optionsString)

Description

to Reg Exp

License

Mozilla Public License

Declaration

public static NativeRegExp toRegExp(String source, String optionsString) 

Method Source Code

//package com.java2s;
/**//from   w w  w  .  j  a v a 2s  . c  om
 * Copyright 2010-2016 Three Crickets LLC.
 * <p>
 * The contents of this file are subject to the terms of the Mozilla Public
 * License version 1.1: http://www.mozilla.org/MPL/MPL-1.1.html
 * <p>
 * Alternatively, you can obtain a royalty free commercial license with less
 * limitations, transferable or non-transferable, directly from Three Crickets
 * at http://threecrickets.com/
 */

import jdk.nashorn.internal.objects.NativeRegExp;

public class Main {
    public static NativeRegExp toRegExp(String source, String optionsString) {
        return (NativeRegExp) NativeRegExp.constructor(true, null, source, optionsString);
    }
}

Related

  1. isNativeObject(final Object value)
  2. newObject()
  3. parse(final String code, final String name, final boolean includeLoc)
  4. rightAdjustCharHeadWithPrev(final int s, final IntHolder prev)
  5. toDate(final Object value)
  6. unwrap(final Object source)
  7. unwrapMap(ScriptObjectMirror jso)
  8. wrap(Map map)