|
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 of an American mathematician by the name of Stephen Kleene (one of the most influential figures in the development of theoretical computer science) who....
|
|
I have two expressions of type Expression<Func<T, bool>> and I want to take to OR, AND or NOT of these and get a new expression of the same type
Expression<Func<T, bool>> expr1; Expression<Func<T, bool>> expr2; ... ...
Started by BjartN on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Well, you can use Expression.AndAlso / OrElse etc to combine logical expressions, but the problem is the parameters; are you working with the same ParameterExpression in expr1 and expr2? If so, it is easier:
var body = Expression.AndAlso(expr1.....
|
|
Hi,
I am working on a math expression parser using regular expressions and I am trying to add support for parentheses.
My parser works like this:
function parse_expression(expression){ Find parenthetical expressions Loop through parenthetical expressions...
Started by Kyle on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
Unfortunately, the language of arbitrarily nesting parenthesis is not regular and can therefore not be matched using a... .
If I'm not mistaken, this language is not regular, so it is a theoretical impossibility to do this with regular expressions.
|
Ask your Facebook Friends
|
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):
# escaped characters | \[(?:[^\]\\]+|\\.)*\] # character classes | \( (?:\?[:=!]|\... .
/ ^ # start of string ( # first group start (?: (?:[^?+*{}()[\]\\]+ # literals and ^, $ | \\ .
Evaluate it in a try..catch or whatever your language provides .
Unlikely.
|
|
Hi friends,
I need to know what is the difference between <%= expression %> and <%= expression -%> on rails, please help me to make good foundation on Ruby On Rails
Started by Senthil Kumar Bhaskaran on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
I say don....
It's usefull if you want to control the amount of whitespace you have in the generated HTML but do not want to put all the code in a single line .
The '-%>' means, that no linebreak will be appended to the output of the expression.
|
|
I've got a problem with Expression Web 3. Just installed Expression Studio trial form official site plus few adds from there. Expression Web SP1 doesn't want to be install on my machine. When I run Expression Web aplication it just reset my computer. ...
Started by Kamilos on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Have a look here:
http://social.expression.microsoft.com/Forums/en-US/web/thread/94e0481b-01a6-4040-a8b3-3a98c24f8509
ServicePack3 helps..
|
|
I have used C# expressions before based on lamdas, but I have no experience composing them by hand. Given an Expression<Func<SomeType, bool>> originalPredicate , I want to create an Expression<Func<OtherType, bool>> translatedPredicate...
Started by michielvoo on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
You have to wrap your existing delegate inside a lambda that creates a new type from the argument type:
var translatedPredicate = x => originalPredicate(OtherTypeFromSomeType(x))
Where OtherTypeFromSomeType... .
There is no implicit way to do the translation.
|
|
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, and thus....
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.
|
|
Hello, I already had the SQL Server 2008 Express engine installed (just the bit that comes with VS 2008 Express). I then installed SQL Server 2005 Express followed by SQL Server 2005 Management Studio Express, all of which seemed to install OK without...
Started by Paul Moss on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Run "services.msc" and check the....
Easiest way is to start the Service Manager (run services.msc )and see the instance name there .
The 2005 toolset it's Express.
You are right that the SQL 2008 Express took the 'SQLEXPRESS' instance name.
|
|
Ok, I'm lost. Why is the 1st function WRONG (squiglies in the lamda expression), but the 2nd one is RIGHT (meaning it compiles)?
public static Expression<Func<IProduct, string, bool>> IsValidExpression(string val) { return (h => h.product...
Started by Robert on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
What is the middle string intended to do? You can make it compile by:
public static Expression<Func<IProduct, string, bool>> IsValidExpression(string val) { return (h,something) => h.product_name == val; }
Or maybe you mean:
public static... .
|