t would let me easily pick out the data I need. However, for the most
> part, the only thing I really need off this page is the CVEs, which look
> like this:
>
> CVE-2021-40539
>
> I'm thinking I might write regex against the plain text of the page, but
> I'm also
ector-that-uses-regex
- The were also having problems with text encoding, hopefully you wont.
hth,
-Harold
On Wednesday, February 2, 2022 at 1:22:53 PM UTC-7 lawrence...@gmail.com
wrote:
> Assume I've been cursed to scrape HTML. If I convert the pages to Hickory
> I end up with a
If all you're looking for is the format CVE--N then by all means
just use regex against the plain text of the page. If you need to do dom
traversal then jsoup is a good choice. Otherwise, like Mark said, tree-seq
is a great choice if you don't want to play with clojure.walk.
On
:
>
> CVE-2021-40539
>
> I'm thinking I might write regex against the plain text of the page, but
> I'm also curious, is it common to take something like Hiccup or Hickory or
> a zipper and run regex through it? If yes, how is that done?
>
> A small part of the
e is the CVEs, which look
like this:
CVE-2021-40539
I'm thinking I might write regex against the plain text of the page, but
I'm also curious, is it common to take something like Hiccup or Hickory or
a zipper and run regex through it? If yes, how is that done?
A sma
There are edn impls in at least 15 languages so the problem is wider than just
java and js.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated -
How would you resolve the problem "Rich Hickey" mentioned on the page you
linked? "The lack of portability for regexes"... True, *some* regex
patterns mean the same thing in the JVM and JS, but in general a regex
pattern is not a portable value; it may mean something diff
Thanks for the reply! Glad to have confirmations.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your
first post.
T
Not adding much to what you've already said, but a custom reader tag is
exactly what I would reach out for in this situation.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that post
Hi, just writing this out of pure curiosity.
Background:
1. I thought I could write regex literals like this in an edn file
containing configurations:
:some-parameter #"foo"
But reading this with e.g. clojure.edn/read-string causes an error
No dispatch macro for: "
2.
See also Java's regex "Comparison to Perl 5" at
https://docs.oracle.com/javase/9/docs/api/java/util/regex/Pattern.html.
However, you are in for a treat! Perl is insanely great. Clojure is
simply great.
--
You received this message because you are subscribed to the Google
...)
Randy
On Tue, Dec 4, 2018 at 1:37 PM Justin Smith wrote:
> You don't need to use re-matcher in that example - the output of re-find
> with the regex and the string is identical. If you are using the matcher to
> collect a series of matches in one string, you can also uses re-seq whi
You don't need to use re-matcher in that example - the output of re-find
with the regex and the string is identical. If you are using the matcher to
collect a series of matches in one string, you can also uses re-seq which
returns a lazy-seq of the matches of your regex in the string.
On Tue
erhut
wrote:
> The doc string for re-matches says that it
> uses java.util.regex.Matcher.matches(). The Java doc page for the class
> java.util.regex.Matcher [1] says "The matches
> <https://docs.oracle.com/javase/8/docs/api/java/util/regex/Matcher.html#matches-->
> method
The doc string for re-matches says that it
uses java.util.regex.Matcher.matches(). The Java doc page for the class
java.util.regex.Matcher [1] says "The matches
<https://docs.oracle.com/javase/8/docs/api/java/util/regex/Matcher.html#matches-->
method
attempts to match the entire inp
I must be doing something wrong here, but I cannot figure this out.
The following results in "nil" from re-matches:
(re-matches #"\[((\d+)-(\d+)-(\d+) (\d\d):(\d\d))\] (.*)" "[1518-05-27
00:42] falls asleep\n")
This, however, properly matches the line and produces the backreferences:
(re-find (
Thank you.
On Wednesday, March 8, 2017 at 12:11:26 PM UTC-5, Sean Corfield wrote:
>
> Because you have a space in your regex, it is treated as a range, from
> space to underscore which matches a lot of characters. Move the – to the
> start:
>
>
>
>
Because you have a space in your regex, it is treated as a range, from space to
underscore which matches a lot of characters. Move the – to the start:
(clojure.string/replace phone #"[- _]" garbage)
Sean Corfield -- (970) FOR-SEAN -- (904) 302-SEAN
An A
I built a string matching system, so when we get new records, from crawling
the web, we can find out if we already have the same information in the
database. There are many parameters to tune, and so I wanted to generate
the F1 score for the different parameters. I can easily test True Positives
e:
>
> Or even more simply, since the thing you want to replace is a single
> character, you do not need a regex to match it, but can match a string that
> is not a regex at all, e.g.:
>
> (st/replace "**username" "*" "$")
>
> The doc string
Or even more simply, since the thing you want to replace is a single
character, you do not need a regex to match it, but can match a string that
is not a regex at all, e.g.:
(st/replace "**username" "*" "$")
The doc string for clojure.string/replace is fairly ex
; => (f [:!!username "michael"])
>
> StringIndexOutOfBoundsException String index out of range: 1
> java.lang.String.charAt (String.java:695)
>
> or:
>
> => (def f (fn [%] (st/replace (name (first %)) #"\*" "$")))
>
> => (f [:**
I'm working on a website with a frontender who asked to be able to save
JSON maps that contain field names such as:
"$$hashKey" : "00C"
The dollar signs are a violation of MongoDB limits on field names, so i
need to convert to something else and then convert back. So I thought I
would convert
clojure.string/replace replaces the portion of the string matched by the regex
with the replacement. If you add ".*" to the regex, the regex will match the
entire input string and the form will evaluate to "First".
--Steve
On May 27, 2014, at 11:24 AM, Glen Rubin wrote:
ng/replace nameidstring #"Name:\s(\w+){1},(\w+){1}" "$2")
Unfortunately, this gives me the First name along with ID: GA88192
since i specified a single word {1} in my regex above I don't understand
why this is happening. THank you for any advice
--
You received this messag
Of course! Thank you.
On Friday, 18 April 2014 15:33:39 UTC+1, A. Webb wrote:
>
>
>
> On Friday, April 18, 2014 8:28:03 AM UTC-5, Thumbnail wrote:
>>
>>
>> ... I decided that the terminal state would always be at index 0 ...
>>>
>>
>> Shouldn't a DFA allow for *any* *set* of states to be termina
On Friday, April 18, 2014 8:28:03 AM UTC-5, Thumbnail wrote:
>
>
> I had a couple of insights. First, to allow the dfa to be generated
>> programmatically, I changed it from a map to a vector. This means
>> that the next state can just be an integer. Second, I decided that
>> the terminal s
> I had a couple of insights. First, to allow the dfa to be generated
> programmatically, I changed it from a map to a vector. This means
> that the next state can just be an integer. Second, I decided that
> the terminal state would always be at index 0 ...
>
Shouldn't a DFA allow for *a
Erlis Vidal writes:
> @Phillip: Wow! I'm wondering why paredit doesn't fix this issue. Thanks for
> the patch!
Because this syntax is specific to clojure and not all lisps!
Hopefully, I'll get around to submitting a patch to paredit at some
point. If not me, I am sure someone will do it!
Phil
h
>
>
> On Monday, March 3, 2014 10:09:47 PM UTC+1, Erlis Vidal wrote:
>
>> Hi this is not a clojure question but I'm sure some one on this list can
>> help me.
>>
>> I'm trying to write a regex using paredit and it looks like I cannot
>> write someth
or issues,
raise them here: https://github.com/abo-abo/lispy/issues?state=open.
Oleh
On Monday, March 3, 2014 10:09:47 PM UTC+1, Erlis Vidal wrote:
>
> Hi this is not a clojure question but I'm sure some one on this list can
> help me.
>
> I'm trying to write a regex u
Erlis Vidal writes:
> Hi this is not a clojure question but I'm sure some one on this list can
> help me.
>
> I'm trying to write a regex using paredit and it looks like I cannot write
> something like this
>
> #"mypattern \d"
>
> whenever
Magnar
On Monday, March 3, 2014 10:09:47 PM UTC+1, Erlis Vidal wrote:
>
> Hi this is not a clojure question but I'm sure some one on this list can
> help me.
>
> I'm trying to write a regex using paredit and it looks like I cannot write
> something like this
>
Hi this is not a clojure question but I'm sure some one on this list can
help me.
I'm trying to write a regex using paredit and it looks like I cannot write
something like this
#"mypattern \d"
whenever I type the character \ I see the text "Escaping character...&
Jan 16, 2014 at 1:02 PM, Kuba Roth wrote:
> Hi,
> This is more of a regex specific question the clojure, but anyway...
> I have the a multiline string as follow:
> (def myText "aSTART
>
>
> END
> ee
> ff
> ggg
> START
>
>
(clojure.string/replace myText #"(?s)START.*?END" "==")
;; "a==\nee\nff\nggg\n==\n\n"
(?s) specifies multi-line mode, *? is the non-greedy form of *.
On Thu, Jan 16, 2014 at 1:02 PM, Kuba Roth wrote:
> Hi,
> This is more of a
Hi,
This is more of a regex specific question the clojure, but anyway...
I have the a multiline string as follow:
(def myText "aSTART
END
ee
ff
ggg
START
ii E
END
")
.. and I need to replace all text between START END 'k
Hi all,
I am trying to parse some java source file that contain the definition of
an interface, what I need is to get the name of the interface, what methods
it defines and what other interfaces it extend.
I used a regex (there is any clever way other than analyze the source ?)
that works
I wrote this little macro today that lets you do it. However, I feel like
it was implemented in a pattern match library or something... but I'm not
sure.
Someone let me know if I'm re-inventing the wheel.
If I'm not, here's the code:
(defn re-bind-fn
[str re bnds act & forms]
`(let [~'__TE
On Jun 16, 4:47 am, Alex Baranosky
wrote:
> IS it possible to use the regex reader macro #"" with generated code? What
> I mean is do something like:
>
> #"${(join "|" (range 1 1))}"
>
> I'm using ${...} to mean string interpolation,
2011/6/16 Alex Baranosky :
> IS it possible to use the regex reader macro #"" with generated code? What
> I mean is do something like:
> #"${(join "|" (range 1 1))}"
> I'm using ${...} to mean string interpolation, though I know Clojure doesn
On Wed, Jun 15, 2011 at 10:47 PM, Alex Baranosky
wrote:
> IS it possible to use the regex reader macro #"" with generated code? What
> I mean is do something like:
> #"${(join "|" (range 1 1))}"
> I'm using ${...} to mean string interpolation, t
IS it possible to use the regex reader macro #"" with generated code? What
I mean is do something like:
#"${(join "|" (range 1 1))}"
I'm using ${...} to mean string interpolation, though I know Clojure doesn't
have that syntax. Is there a way to g
t;
>
>
>
>
> > Hi Everyone,
>
> > I'm extremely stuck on this simple regex question, which I'm sure
> > someone with a little more experience will be able to write in a
> > second. I would really appreciate the help.
>
> > Given a string consisting
On Sunday 22 August 2010 01:11:38 CuppoJava wrote:
> Hi Everyone,
>
> I'm extremely stuck on this simple regex question, which I'm sure
> someone with a little more experience will be able to write in a
> second. I would really appreciate the help.
>
> Given a str
g with currently.
> -Patrick
>
> On Aug 21, 8:45 pm, Chouser wrote:
>> On Sat, Aug 21, 2010 at 7:11 PM, CuppoJava
>> wrote:
>>> Hi Everyone,
>>
>>> I'm extremely stuck on this simple regex question, which I'm sure
>>> someone with a lit
Wow that's so short! Thanks Chouser! I will abstain from showing the
awful hack that I've been working with currently.
-Patrick
On Aug 21, 8:45 pm, Chouser wrote:
> On Sat, Aug 21, 2010 at 7:11 PM, CuppoJava wrote:
> > Hi Everyone,
>
> > I'm extremely st
On Sat, Aug 21, 2010 at 7:11 PM, CuppoJava wrote:
> Hi Everyone,
>
> I'm extremely stuck on this simple regex question, which I'm sure
> someone with a little more experience will be able to write in a
> second. I would really appreciate the help.
>
> Given a str
Hi Everyone,
I'm extremely stuck on this simple regex question, which I'm sure
someone with a little more experience will be able to write in a
second. I would really appreciate the help.
Given a string consisting of a's, b's, and spaces: "aaa bbb abb ab
bb"
e letter gets appended to the end of the number.
>
> This seems like a great place to use regexhow would one craft a
> pattern for this?
>
> Thanks
>
> Base
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" gro
If you want a single regex that matches either M123.5554 or 1234.435M, you need
to use the OR form (a|b):
([ML]\d+\.\d+|\d+\.\d+[ML])
where:
[ML] matches M or L
\d+ matches 1 or more digits
\. matches a .
-Fred
--
Science answers questions; philosophy questions answers
at would be
>
> M123.5554
> or 1234.435M
>
> i.e. - the letter gets appended to the end of the number.
>
> This seems like a great place to use regexhow would one craft a
> pattern for this?
>
> Thanks
>
> Base
>
> --
> You received this message bec
the number.
This seems like a great place to use regexhow would one craft a
pattern for this?
Thanks
Base
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that post
On 3 February 2010 08:58, Meikel Brandmeyer wrote:
> condp was specifically designed to be a scheme-like cond with :>>
> support and such.
Well, I like condp a lot (really, condp FTW! -- definately worth a
define-syntax in Scheme :-)), but it's nothing like Scheme's cond
(which is a good thing, a
293212
>
> Basically this would allow you to write things like
>
> (scond [(re-matches first-regex line) :>> process-result-1]
> [(re-matches second-regex line) :>> process-result-2]
> [(re-matches third-regex line)] ; return the matches without
> f
[(re-matches first-regex line) :>> process-result-1]
[(re-matches second-regex line) :>> process-result-2]
[(re-matches third-regex line)] ; return the matches without
further processing, if any
[:else (give-up)])
Although I suppose Meikel Brandmeyer'
l\)each:" line))
> > (first (re-matches #".*(\.[0-9a-zA-Z]+)" line))])
>
> A simplified version:
>
> (some #(first (re-matches % line)) [first-regex second-regex])
>
> Sincerely,
> Michal
--
You received this message because you are subscribed to the Goo
rsion:
(some #(first (re-matches % line)) [first-regex second-regex])
Sincerely,
Michal
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moder
It occurs to me you could use 'some instead of nested if-lets:
(some identity
[(first (re-matches #"([0-9]+) byte\(null\)each:" line))
(first (re-matches #".*(\.[0-9a-zA-Z]+)" line))])
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to t
t; not to show when this is run as a script, but why are the
> aforementioned strings not being output?
Just a guess, but perhaps none of your tests pass:
user=> (cond false :foo)
nil
> Anyway, I not only want the regex to be used
> in the condition expression, but also want t
the
sequence is not realised. In the repl it is (the printed nils) and hence the
println's are executed.
> While you're at it, you may be able to help me with an additional
> problem I'm trying to tackle. As you can see if the above code, I'm
> trying to match on certain
t; > the strings "Byte pattern!" and "File pattern!". I expect the nil's
> > not to show when this is run as a script, but why are the
> > aforementioned strings not being output?
>
> > While you're at it, you may be able to help me with an additi
t?
>
> While you're at it, you may be able to help me with an additional
> problem I'm trying to tackle. As you can see if the above code, I'm
> trying to match on certain lines of a text file. I'm using "cond" to
> do this with as a switch statement is t
show when this is run as a script, but why are the
aforementioned strings not being output?
While you're at it, you may be able to help me with an additional
problem I'm trying to tackle. As you can see if the above code, I'm
trying to match on certain lines of a text file. I'm u
> While doing some scripting and as a learning I put together some file and
> regex utilities. Reading though parts of clojure-contrib was a great eye
> opener. Still needs some cleanup, doc, and maybe a few more functions. I
> could wrap all the java.io.File functions but most are
While doing some scripting and as a learning I put together some file and
regex utilities. Reading though parts of clojure-contrib was a great eye
opener. Still needs some cleanup, doc, and maybe a few more functions. I
could wrap all the java.io.File functions but most are just a thin wrapper
egexps. However (filter is-number-regex maybe-numbers) is clear to
even programmers that don't understand regexps.
On Aug 27, 10:41 am, Sean Devlin wrote:
> On Aug 27, 1:06 am, Timothy Pratley wrote:
>
>
>
> > > Granted, this wouldn't work for anything that gets passed
On Aug 28, 2009, at 12:13 PM, Chouser wrote:
> On Fri, Aug 28, 2009 at 10:01 AM, Shawn
> Hoover wrote:
>>
>> However, unless the platforms agree on literal regex
>> syntax (they don't, beyond the basic "asdf|[0-9]+"
>> features) will prevent tru
On Fri, Aug 28, 2009 at 10:01 AM, Shawn Hoover wrote:
>
> However, unless the platforms agree on literal regex
> syntax (they don't, beyond the basic "asdf|[0-9]+"
> features) will prevent true portability of the literals.
This is an interesting and crucial assertion
On Aug 28, 2009, at 10:01 AM, Shawn Hoover wrote:
> Why wouldn't #"" produce whatever the corollary regex object is on
> each host platform?
>
> I had a couple suggestions on clojure-dev for ClojureCLR that line
> up with the "produce the corollary idea&
on to write Clojure code that can run on
>> non-JVM platforms. So although this idea has come up and
>> then been abandoned several times before, I think it's worth
>> bringing up again periodically to see what makes sense.
>
> Why wouldn't #"" produce whatever
on to write Clojure code that can run on
> > non-JVM platforms. So although this idea has come up and
> > then been abandoned several times before, I think it's worth
> > bringing up again periodically to see what makes sense.
>
> Why wouldn't #"" produ
on to write Clojure code that can run on
>> non-JVM platforms. So although this idea has come up and
>> then been abandoned several times before, I think it's worth
>> bringing up again periodically to see what makes sense.
>
> Why wouldn't #"" produce whatever
has come up and
> then been abandoned several times before, I think it's worth
> bringing up again periodically to see what makes sense.
Why wouldn't #"" produce whatever the corollary regex object is on
each host platform?
Tangentially, if I think ahead a couple of
> > The only feature I want is the ability to use a regex as a predicate.
> Would automatically forcing the first step to get a nice 'nil' be
>unacceptable?
Sounds good to me!
This can be quite easily accommodated:
(defn re-fn
"Construct a regular expression from
Awesome.
+1
On Aug 27, 9:57 pm, Timothy Pratley wrote:
> > > The only feature I want is the ability to use a regex as a predicate.
> > Would automatically forcing the first step to get a nice 'nil' be
> >unacceptable?
>
> Sounds good to me!
> This can
Hmmm... I think you're confusing the issue. Your compliant seems to
be more directed at "magic numbers" than regexes. If I understand
your argument (which I agree with):
;bad code
(filter #"\d+" maybe-numbers)
;good code
(let [is-number-regex #"\d+"]
(f
n periodically to see what makes sense.
>> Oh - it seems like re-seq does the most work so perhaps that is the
>> best candidate?
>
> The only feature I want is the ability to use a regex as a predicate.
> So, I'd prefer something like re-matches. Maybe this isn't the
&
Or this:
(def number-text? #"^\d$")
Which is a savings :)
On Aug 27, 5:21 pm, eyeris wrote:
> I named is-number-regex poorly. I meant it to be a function that calls
> re-matches. Here's a more complete snippet, with better names:
>
> ; bad code
> (filter #&qu
I named is-number-regex poorly. I meant it to be a function that calls
re-matches. Here's a more complete snippet, with better names:
; bad code
(filter #"^\d+$" maybe-numbers)
; good code
(defn re-match? [re s] (not (nil? (re-matches re s
(defn number-text? [s] (re-ma
cs might be confusing - so a wrapper
> seems more obvious for that.
>
> Oh - it seems like re-seq does the most work so perhaps that is the
> best candidate?
The only feature I want is the ability to use a regex as a predicate.
So, I'd prefer something like re-matches. Maybe th
> Granted, this wouldn't work for anything that gets passed to Java, but
> the following gist would be a start.
> http://gist.github.com/176032
You already have a getPattern method for those cases. Which suggests
another solution:
(defn re-fn
"Uses ss to construct a java.util.Pattern.
Return
Well, with a statically typed language this would be a problem.
What if we used duck-typing to get around this?
Granted, this wouldn't work for anything that gets passed to Java, but
the following gist would be a start.
http://gist.github.com/176032
Now, We'd still have to address Mr. Pratley'
On Aug 26, 9:46 pm, Timothy Pratley wrote:
> > java.util.regex.Pattern
>
> I imagine a wrapper class could be returned instead that implemented
> IFn and Pattern,
Unfortunately, Pattern is a final class.
Rich
--~--~-~--~~~---~--~~
You received this message beca
On Aug 26, 2009, at 9:46 PM, Timothy Pratley wrote:
>> java.util.regex.Pattern
>
> I imagine a wrapper class could be returned instead that implemented
> IFn and Pattern,
Pattern is a final concrete class, so that's not possible.
...I'm counting down until I
> java.util.regex.Pattern
I imagine a wrapper class could be returned instead that implemented
IFn and Pattern,
but which function would it call?
(re-find m)
(re-find re s)
(re-groups m)
(re-matcher re s)
(re-matches re s)
(re-pattern s)
(re-seq re s)
I don't think there is a clear implicit choi
On Aug 26, 2009, at 9:17 PM, Sean Devlin wrote:
> Okay, I'm sure this has come up before. I was just wondering if
> anyone knew why the regex literal doesn't implement IFn?
>
> At first glance it seems like the following would be useful:
>
> user=>(#"\d{3}&q
Okay, I'm sure this has come up before. I was just wondering if
anyone knew why the regex literal doesn't implement IFn?
At first glance it seems like the following would be useful:
user=>(#"\d{3}" "123")
true
This is defined as...
user=>(not (nil? (re-mat
On Jun 21, 2009, at 4:34 PM, Alpinweis wrote:
I am trying some regex in Clojure and I have problems using regex
literals.
Don't know why the following doesn't seem to work:
user=> (re-seq #"\\W+" "the quick brown fox")
()
user=> (re-seq #"\\w+"
I am trying some regex in Clojure and I have problems using regex
literals.
Don't know why the following doesn't seem to work:
user=> (re-seq #"\\W+" "the quick brown fox")
()
user=> (re-seq #"\\w+" "the quick brown fox")
()
user=> (r
Cool, I think I'll stick to my current one which lets me easily use multiple
replacements in one call.
--
Discouragement is a dissatisfaction with the past, a distaste for the
present, and a distrust of the future - Maree De Jong, Life Church New
Zealand.
http://www.talios.com
Sent from Auckland
Mark Derricutt wrote:
> Does clojure come with a built-in regex replace method? I see ones for
> re-split, re-seq etc. but nothing for a simple replace, I've been using:
>
> (defn replace-all
> [st reps]
> (reduce #(.replaceAll %1 (first %2) (second %2)) st reps
Does clojure come with a built-in regex replace method? I see ones for
re-split, re-seq etc. but nothing for a simple replace, I've been using:
(defn replace-all
[st reps]
(reduce #(.replaceAll %1 (first %2) (second %2)) st reps))
but wondered if I was just missing some bu
79a738cbe7f41e9
Frantisek
On 22 Ún, 02:37, Chouser wrote:
> On Sat, Feb 21, 2009 at 1:34 PM, Frantisek Sodomka wrote:
>
> > nth claims to also work on regex Matchers:
>
> > user=> (doc nth)
> > -
> > clojure.core/nth
> > ([coll index] [c
On Sat, Feb 21, 2009 at 1:34 PM, Frantisek Sodomka wrote:
>
> nth claims to also work on regex Matchers:
>
> user=> (doc nth)
> -
> clojure.core/nth
> ([coll index] [coll index not-found])
> Returns the value at the index. get returns nil if
nth claims to also work on regex Matchers:
user=> (doc nth)
-
clojure.core/nth
([coll index] [coll index not-found])
Returns the value at the index. get returns nil if index out of
bounds, nth throws an exception unless not-found is supplied. nth
also works
For posterity: got it working! Here is how (just ignore all the gene
amino window size like words, they are specific for my code)
(add-classpath "file:///linuxhome/tmp/boris/automaton.jar")
(import '(brics.automaton.RegExp))
(import '(brics.automaton.Automaton))
(import '(brics.automaton.RunAutom
Hired a monkey to hit random keys on my keyboard, and eventually
figured out how to get the automaton working.
RegExp r = new RegExp("ab(c|d)*");
Automaton a = r.toAutomaton();
String s = "abcccdc";
System.out.println("Match: " + a.run(s)); // prints: true
(add-classpath "file:///home/boris/pro
Hi all.
Ported my research project to clojure, and now just benchmarking parts
of it. I am currently spending about 5/6th of all simulation time
doing regular expressions, so I looked into alternative regex engines,
optimizing the regular expression and trying to find out whether
clojure'
quot;bab") ; but this, in all its noobness, is
> > not
> > ; Evaluation aborted.
> > user> #(str "a" ".*")
> > # ; what
> > is this thing? can I use it somehow?
>
> It's a function! You could have built the same thing like th
1 - 100 of 127 matches
Mail list logo