|
Why are regular expressions called regular expressions?
Started by Nick Pierpoint on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
Why are they called "regular expressions?"
Regular expressions trace back to the work in the development of theoretical computer science) who developed regular expressions as a notation for describing what he called "the algebra of....
|
|
Is is possible to detect a valid regular expression with another regular expression? If so please give example code below.
Started by psytek on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
However: if you loosen written a wonderful treatise on regex engine... .
True regular this is a necessary requirement for regular expressions the answer is no.
Good question.
It now matches itself (the short version at least).
Edge assertions.
|
|
I had a work for the university which basically said:
"Demonstrates that the non-regular language L={0^n 1^n : n natural} had no infinite regular sublanguages."
I demonstrated this by contradiction. I basically said that there is a language S which is...
Started by Freddy on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
L1 n L2 is....
That is if L1 and L2 are regular then:
L1 L2 (concatenation) is also regular.
Also you can consider that regular languages are closed under complement, union, intersection, and the kleene star.
Might help in your proof.
|
Ask your Facebook Friends
|
Is it possible to write a regular expression which matches regular expressions? Does anyone have examples? If there is some theoretical obstruction, does anyone know of a regex which will match at least the most common regex patterns?
Started by Andrea on
, 8 posts
by 8 people.
Answer Snippets (Read the full thread at stackoverflow):
Regular expressions are not a regular language....
Regular expressions can be nested indefinitely (eg, /(a(b(c(d))))/ ), which is impossible to match using standard regex.
It is not possible using standard regular expressions.
|
|
Does anyone have any good link to a website or a good tool to create regular expressions rather than break your head to create one. The tool should be able to create regular expressions by simply selecting some sort of pattern text. For e.g If I want ...
Answer Snippets (Read the full thread at stackoverflow):
But you can make use of software on in the regex, which means you'll be a ... .
But I'd recommend putting some time in and learning regular regular expressions without having any clue about them doesn't work.
Expresso has a regex GUI builder.
|
|
Is there a way to test if a regular expression "contains" another regular expression?
For example:
RegEX1 = "a.*b"; RegEx2 = "a1.*b";
RegEX1 "contains" RegEX2.
As far as I know - this can't be done, am I wrong? OK, joel.neely has shown that it can be ...
Started by Dror on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
It would only work for "simple" regular expressions (or real.
Be minded, so avoid revisiting old nodes.
|
|
Does anyone have code for finding a file that contains a regular expression? I would assume you could have two different flavors, one for BREs and one for EREs.
You would think some kind of test suites would have something like an isRegex() test. Can ...
Started by tkotitan on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
A regular....
The clue is that they contain parentheses and square brackets and such that must be balanced .
Regular expressions are themselves not a regular language .
Beyond
egrep '/.+/' file
you're looking at a really involved exercise.
|
|
... AA BB sysodufsoufdds BB AA ...
Where AA , BB can be arbitary consecutive string with no space in it.
But I want to get the outest pair : AA
More examples:
Input:
a HH CC abc CC HH c
Output:
HH
Input:
x YYYY j DD GG DD hsu DD GG DD k YYYY o
Output:...
Answer Snippets (Read the full thread at stackoverflow):
That said, I have used regexes I'm interested in would never be nested etc... .
Someone asks a question like this, but the problem (in a nutshell) is that HTML is not regular mind) uses regular expressions to "parse" HTML - they use a parser.
|
|
I think that the title accurately summarizes my question, but just to elaborate a bit, instead of using a regular expression to verify properties of existing strings, I'd like to use the regular expression as a way to generate strings that have certain...
Started by brad on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
To handle the extra Perl features it'd be easiest to add on a post .
These all work on regular expressions without back-references -- that is, 'real' regular expressions rather than Perl regular expressions.
|
|
Good Afternoon, gang! I am posting some items for sale that another use had previously committed to buying but seems to have gone MIA instead. I've waited about 2 months for him, which I thought was fair, but it's time to make these guys available once...
Started by I Crave Pizza No More on
, 17 posts
by 6 people.
Answer Snippets (Read the full thread at thetechnodrome):
Also should have kept my regular Don, but I traded him.
An exclusive, but I should have just kept both.
|