GithubHelp home page GithubHelp logo

pcre's People

Contributors

jalonsolov avatar medvednikov avatar rolfschmidt avatar spytheman avatar walkingdevel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pcre's Issues

Code using pcre does not compile on macOS

Compilation error:

==================
              ^
/var/folders/2y/7ldjq9qn1ls6b184zfv7040m0000gn/T/v/main.13159573688693451185.tmp.c:1226:31: error: expected identifier or '('
static string struct pcre_str(struct pcre it); // auto
                              ^
/var/folders/2y/7ldjq9qn1ls6b184zfv7040m0000gn/T/v/main.13159573688693451185.tmp.c:1226:31: error: expected ')'
/var/folders/2y/7ldjq9qn1ls6b184zfv7040m0000gn/T/v/main.13159573688693451185.tmp.c:1226:30: note: to match this '('
static string struct pcre_str(struct pcre it); // auto
                             ^
/var/folders/2y/7ldjq9qn1ls6b184zfv7040m0000gn/T/v/main.13159573688693451185.tmp.c:1227:28: error: expected ';' after top level declarator
static string indent_struct pcre_str(struct pcre it, int indent_count); // auto
                           ^
                           ;
...
==================
(Use `v -cg` to print the entire error message)

I have pcre installed via Homebrew:

$ brew info pcre
pcre: stable 8.44 (bottled), HEAD
Perl compatible regular expressions library
https://www.pcre.org/
/usr/local/Cellar/pcre/8.44 (204 files, 5.5MB) *
  Poured from bottle on 2020-05-19 at 12:31:13
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/pcre.rb
License: BSD-3-Clause
==> Options
--HEAD
        Install HEAD version
==> Analytics
install: 168,466 (30 days), 553,389 (90 days), 2,721,188 (365 days)
install-on-request: 6,893 (30 days), 23,707 (90 days), 82,768 (365 days)
build-error: 0 (30 days)

I'm not familiar with C. Is this perhaps a C-compiler issue?

Initialization of err and studyerr fails

OS version: Pop!_os 20.10

error log:

error: cannot initialize builtin type `string`
  pub fn new_regex(source string, options int) ?Regex {
  err := string{}
  studyerr := string{}
  erroffset := 0

Fix would be quite easy :)

err := ""
studyerr := ""

get_all and get throw differing results

Sounds silly as get_all uses get to gather it's results. But this is what we get.

import pcre

// match value between double quotes (don't include quotes)
r := pcre.new_regex('"(.*?)"', 0)!

s := '"hello"'
m := r.match_str(s, 0, 0) or {
	println('No match!')
	return
}

println(m.get(0)!) // "hello"
println(m.get_all()[0]) // hello

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.