Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

regex does not take into account question mark #2

Open
GoogleCodeExporter opened this issue Aug 28, 2015 · 0 comments
Open

regex does not take into account question mark #2

GoogleCodeExporter opened this issue Aug 28, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

The regular expression used to filter out.  The preamble can contain ???? like 
shown below:

@misc{publisher_hrsc_????,
    title = {{HRSC} Data Browser},
    author = {publisher}
}



This was my solution:

  this.key = function() {
    var start = this.pos;
    while(true) {
      if (this.pos == this.input.length) {
        throw "Runaway key";
      }

      if (this.input[this.pos].match("[a-zA-Z0-9_:?\\./-]")) {
        this.pos++
      } else {
        return this.input.substring(start, this.pos).toUpperCase();
      }
    }
  }

Original issue reported on code.google.com by JCCC...@gmail.com on 2 Jul 2011 at 7:53

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant