What is Expressions: Definition and 330 Discussions

A regular expression (shortened as regex or regexp; also referred to as rational expression) is a sequence of characters that specifies a search pattern. Usually such patterns are used by string-searching algorithms for "find" or "find and replace" operations on strings, or for input validation. It is a technique developed in theoretical computer science and formal language theory.
The concept arose in the 1950s when the American mathematician Stephen Cole Kleene formalized the description of a regular language. The concept came into common use with Unix text-processing utilities. Different syntaxes for writing regular expressions have existed since the 1980s, one being the POSIX standard and another, widely used, being the Perl syntax.
Regular expressions are used in search engines, search and replace dialogs of word processors and text editors, in text processing utilities such as sed and AWK and in lexical analysis. Many programming languages provide regex capabilities either built-in or via libraries, as it has uses in many situations.

View More On Wikipedia.org
  1. M

    Are these the correct expressions for ## dF/dy' ##?

    a) ## dF/dy'=\frac{1}{4}(1+y'^2)^{\frac{-3}{4}}\cdot 2y' ## b) ## dF/dy'=cos (y') ## I just took the derivatives above and found out these expressions, but may anyone please check/verify to see if these expressions for ## dF/dy' ## are correct? Also, I do not understand part c). What does 'exp'...
  2. S

    I Reconciling 2 expressions for Riemann curvature tensor

    I'm reading Carroll's GR notes and I'm having trouble deciphering a particular expression for the Riemann curvature tensor. The coordinate-free definition is (eq. 3.71 in the notes): $$R(X,Y)Z=\nabla_X\nabla_YZ-\nabla_Y\nabla_XZ-\nabla_{[X,Y]}Z$$ An index-based expression is also given in (eq...
  3. paulimerci

    Determine expressions for the following in terms of M, X, D, h and g

    d) The block of mass m is pushed toward the wall until the spring has been compressed, and so the spring has stored PE, and when the block is released, it follows a projectile motion and strikes the floor ##stored PE\rightarrow K.E ##. By law of conservation of energy, $$ E_i = E_f $$ $$ mgh +...
  4. J

    Two vector operations and simple expressions

    TL;DR Summary: My problems comes to a vector expression which needs to be simplified I got an expression pi=εijksk,lul,j Here s and u are two vectors. What will be the vector expression of this vector p with curl s, curl u, and other operations?
  5. A

    I How Do You Integrate Expressions Like These?

    How do you you integrate expressions like these? 1. ##\frac{1}{\sqrt{x^3 + 3}}## 2. ##\frac{1}{\sqrt{x^4 + 3}}## 3. ##\frac{1}{x \sqrt{x^5 + 3}}## 4. ##\frac{1}{x^2 \sqrt{x^3 + 3}}## 5. ##\frac{1}{x^3 \sqrt{x^3 + 3}}## 6. ##\frac{1}{x^4 \sqrt{x^3 + 3}}## 7. ##\frac{1}{x^5 \sqrt{x^3 + 3}}##...
  6. M

    Mathematica How to simplify expressions in Mathematica with log and exp in them?

    Hi, This is a pretty simple question, but I am new to Mathematica so I am not sure if I am missing something obvious. Question: How do I make the expression ## e^{log(z)} ## return z? Attempt: I have used all of the following combinations and all of them return ## e^{log(z)}##. Are there any...
  7. shivajikobardan

    Comp Sci Regular expression to NFA -- confusing regular expressions-:

    R=(01+010)* For it I made the below nfa which i believe seems correct. Plus the tutorials that I am following also make sure it’s correct. Q0 is initial state(forgot to mention in figure). R=(01)*+(010)* But idk how to convert this to NFA What will be languages accepted by this NFA? Won’t...
  8. shivajikobardan

    MHB Regular expression to NFA-confusing regular expressions-:

    R=(01+010)* For it I made the below nfa which i believe seems correct. Plus the tutorials that I am following also make sure it’s correct. Q0 is initial state(forgot to mention in figure)...
  9. A

    I Alternate expressions for the uncertainty propagation

    I have seen that there are two different formulas that we can use when calculating the propagation of uncertainty in a measurement. If ##X=f(A, B, C, \ldots)## is the quantity whose uncertainty we want to estimate, which depends on the quantities ##A,B,C,...##, then we could calculate the...
  10. rstor

    I Keisler Elementary Calculus: computing standard parts of expressions

    In Keisler Elementary Calculus page 39, example 4 it shows how to compute the standard parts of the following expression: Example 4: If ##\epsilon## is infinitesimal but non zero, find the standard part of ##b=\frac {\epsilon} {5-\sqrt{25+ε}}## Before calculating the standard parts the...
  11. yucheng

    Unit Basis Components of a Vector in Tensorial Expressions?

    Divergence formula $$\vec{\nabla} \cdot \vec{A}= \frac{1}{\sqrt{G}} \frac{\partial}{\partial q^{j}} (A^{j} \sqrt{G})$$ If we express it in terms of the components of ##\vec{A}## in unit basis using $$A^{*j} = \sqrt{g^{jj}} A^{j}$$ , we get $$\vec{\nabla} \cdot \vec{A}= \frac{1}{\sqrt{G}}...
  12. F

    I Demonstration of inequality between 2 variance expressions

    Just to remind, ##C_\ell## is the variance of random variables ##a_{\ell m}## following a Gaussian PDF (in spherical harmonics of Legendre) : ##C_{\ell}=\left\langle a_{l m}^{2}\right\rangle=\frac{1}{2 \ell+1} \sum_{m=-\ell}^{\ell} a_{\ell m}^{2}=\operatorname{Var}\left(a_{l m}\right)## 1)...
  13. S

    Assigning variable values "on the fly" within expressions

    I've used this kind of thing often in JavaScript and Mathematica. z = ((a=3) +( b=2) )**2 + 1/a +1/b I'm currently learning Julia, and it doesn't seem to be supported. What is this syntax called?
  14. M

    MHB SQL Expressions for RADL Database

    Hey! :giggle: Use the RADL database as a basis for formulating the following SQL commands. 1. Give an SQL expression that outputs all personnel information for the employee Ernst Pach. 2. Give an SQL expression that outputs all personnel information about the employees, who earn more than...
  15. B

    Expressions for energy & entropy from free energy (discrete distribution)

    So just by by using the definition of the partition function... $$ Z = \sum_i e^{ \frac {-E_i} {k_BT} } = e^{ \frac {-0} {k_BT} } + e^{ \frac {-\epsilon} {k_BT} } = 1 + e^{ \frac {-\epsilon} {k_BT} } $$ And then, a result we obtained in class by using the Boltzmann H factor to solve for ##S##...
  16. hackedagainanda

    Quick question about simplifying radical expressions

    So I simplify the expression and get 2 x 3^2 x 7 = 84 and get ##2 \sqrt{21(y−2)^{3/2}}## I don't follow how the answer is ##2(y -2) \sqrt{21 ( y - 2) }##
  17. A

    Propagation Wave Expressions and Wave Velocity

    Hello everyone, I would really appreciate some help on the following problem on plane waves and propagation. Not too sure if my attempt at writing the propagation wave expressions are correct, and how to handle the arbitrary function f(u). For the velocity, the wavelength is not specified, so is...
  18. rpthomps

    I Developing Quantum Expressions using QUBO

    Hi there, I would like some help developing a QUBO expression where a Quantum Annealing approach would find the two ways of summing the 5 numbers {1 2 3 4 5) to 8 by selecting 3 of the numbers. I am basing this off of a dwave.sys video example I found on their site. My initial kick at the can...
  19. patric44

    MATLAB Transforming long symbolic expressions to use in matlab ode45?

    hi guys i build a little function that outputs a symbolic expression like that below, this is only a part of it: (105*(x(5)^2/r^2 - 1)^2)/8 + (210*x(5)^2*(x(5)^2/r^2 - 1))/r^2))/(r^2)^(9/2) + (8*R^7*u*x(5) the problem is the only way to integrate this output is to expand the function externally...
  20. N

    Irrational Numbers a and b used in various expressions

    Give an example of irrational numbers a and b such that the indicated expression is (a) rational and (b) irrational. 1. a +b 2. a•b 3. a/b 4. a - b What exactly is this question asking for? Can someone rephrase the statement above? Thanks
  21. D

    B Term for continuously halving a number

    It's been a long time since I've had a need for my math knowledge and as a result, sadly, a lot has been forgotten. I had a thought the other day and it has been bugging me ever since. What is the mathematical term for when you continually divide any number by 2 until you no longer get a whole...
  22. person123

    LaTeX LaTex to Work With Symbolic Expressions

    For many of the problems in my engineering courses (as well as other STEM courses and maybe even in industry), much of the work is in algebraic manipulation of equations. These problems could be solved using by using symbolic expressions in a coding language like MATLAB. However, it is very...
  23. MesonMarcus

    Can you solve this puzzle involving regular expressions?

    can anyone help solve this puzzle regarding regular expressions? I was given this in an interview test from BAE systems cyber security department a few years ago and just came across it again, still haven't managed to get anywhere like an answer. I have tried matching each line of regex to form...
  24. H

    MHB Solving Function Expressions h(x): (x+a)2 +b & h-1 Range

    The function h is defined as h : x x 2 – 8x – 9 where x ≥4 (a) h(x) can be written in the form (x+a) 2 +b, find the value of ‘a’ and ‘b’ (b) Express the inverse function h –1 in the form h –1 : x ... (c) Find the range of function ‘h’.
  25. Ameen1985

    Isothermal and adiabatic air compression -- different expressions

    Hi all, For an Isothermal compression process of air in a vessel with constant volume, I found the following expressions and and The first two give the same result, meanwhile the third gives another solution and I don't know why. For adiabatic compression I found these two expression which...
  26. L

    MHB Simplifying and expanding expressions

    I have a test on simplifying and expanding expressions, could someone help me with this. I don't understand the formula and the way you do it
  27. S

    Expressions of the form *full, e.g. cupful, bag full, screenfull

    What is your personal practice in dealing with expressions of fullness that end with "full"? (I'm just curious what other people do, I'm not likely to change my own habits.) I don't know if USA English has a rule about writing expressions like "cup full" (two words) vs "cupful" (one word sans...
  28. I

    Activity - Equilibrium Expressions

    When I use the concept of activity to express the equilibrium constant expression, for either equilibrium pressures or concentrations, the units cancel and the value of K has no units (which is how K is customarily reported). But because of the difference in reference states (the reference...
  29. S

    Technology and the chronology of expressions

    Can the chronological occurrence of expressions be roughly matched to the chronology of technology? For example, some expressions such as "red as a beet" make sense in the context of early technology - you need adequate agriculture to make beets a common food item. Other expressions such as...
  30. S

    A Index-Free Expressions & Unique Metric-Compatible Connections

    There are three doubts, but all are from the same section and closely related so I thought I'll ask in one post. I'm studying about connections and came across a quote. Just for context it references this equation relating any two torsion-free covariant derivative operators on a manifold...
  31. Leo Liu

    I How did mathematicians discover the expressions of hyperbolic functions?

    The hyperbolic function ##\cosh t \text{ and } \sinh t## respectively represent the x and y coordinate of the parametric equation of the parabola ##x^2-y^2=1##. The exponential expressions of these hyperbolic functions are $$ \begin{cases} \sinh x = {e^x-e^{-x}} /2; \: x \in \mathbb R, \: f(x)...
  32. S

    Simplifying expressions using Euler's formula

    The following is the questions given. I solved the first one, which steps are shown below. But I am not sure if this is how the question wants me to solve the problem. Would you tell me if the way I solved the problem is the proper way of simplifying the expression using euler's formula...
  33. jack action

    French: "S'il Vous Plaît" Direct Translation to English

    Confirmation from a french Canadian. The direct translation of "s'il vous plaît" or "s'il te plaît" is "please". Actually, in written form, it is rarely use. We literally use "SVP" or "S.V.P.". I wrote this so rarely that I frankly had to check if it wasn't a single word like "s'il-vous-plaît"...
  34. S

    I Nested expressions as compositions of functions?

    How can we write (finite) nested expressions as compositions of functions? For example (using Horner's technique), consider: ##P(x) = 3 + 2x + 4x^2 + 6 x^3 = 3 + x(2 + x(4 + x(6) ) )## The way I see to do it is to use functions of two variables. ##f_3(x,y) = 6## ##f_2(x,y) = 4 + xy##...
  35. R

    Engineering Prove using Boolean algebra that two expressions are equivalent

    Can anyone tell me if I'm doing this right so far? My question really is... does this mean that the next step for me is to expand the last statement shown?Asking because that seems like a lot of work.
  36. Like Tony Stark

    ##\vec v## and ##\vec a## expressions - motion on an off center circle

    Well, I tried decomposing velocity into its components on the radial and angular axis. But I have problems with the angles because in some parts of the trajectory the velocity is on the angular coordinate, but in other parts it isn't. I mean, I can't say ##V=V e_\theta## because it's not always...
  37. M

    MHB Manipulating quadratic and exponential expressions

    I am having so much trouble figuring this out, I would really appreciate some help. The question is: The following function, L, gives the approximate percent literacy rate in India t years after 1900. L(t)=5.3 x 1.025^t Which of the following equivalent functions shows, as a constant or...
  38. M

    Distinct answers for two equivalent expressions?

    Hi, This is not exactly a homework problem. This is something I wonder all the time. 1. Homework Statement We all know that the following expressions give different answers, even though the expressions are equivalent. My question is why does that happen. Why two expressions that are the same...
  39. Baibhab Bose

    How to type mathematical expressions?

    I don't know how to type mathematical symbols and equations and stuff. Like if I want to ask something here in physics forum, I need to type mathematical expressions like everyone here does. How can I do that? Do I need any software?
  40. Boltzman Oscillation

    Engineering Derive expressions for the voltage gain of this opamp circuit

    Homework Statement Derive the expressions for the voltage gain (Gv) of the following op amp: Homework Equations In = Ip = 0 Vp =VnThe Attempt at a Solution I can use KCL, and the fact that In and Ip are both 0, to derive the two equations, one from the top node and the other from the...
  41. George Keeling

    LaTeX Can I make vertical separation of $$ expressions smaller?

    I wrote my first LaTeX like this: ... it was easy to calculate that $$ ê^1=\hat x - \frac { \hat y } {\tan \alpha} $$ and $$ ê^2=\frac { \hat y } {\sin \alpha} $$ where ... Is it possible to make the vertical separation smaller? The first example in the latex primer does not seem to suffer...
  42. Ricardo

    B Questions about the relativistic kinetic energy expressions

    <Moderator's note: Moved from New Member Introduction.> I am asking assistance in addressing several questions I have with the relativistic kinetic energy expressions given as {I am sorry for the format of the notations. It was inadvertently distorted.} KE=mc2 [1/sqrt(1-(v2/c2)) -1]...
  43. I

    Setting two expressions equal to each other

    Homework Statement Two cars are facing each other on a long straight airport runway. They are initially separated by a distance of 1 km. Car A begins to accelerate towards the other car at a uniform 0.5 ms^-2. Ten seconds later car B begins to move towards the other car with a uniform...
  44. A

    Combine the expressions for tension and solve for acceleration

    1. Derive an equation for the acceleration of both the cart and suspended mass in terms of both masses (Mc and Ms ), the angle of the incline (θ), and the acceleration due to gravity (g). Homework Equations Fx= T - Mgsin θ = Ma T = Mgsin θ + Ma Fy T = mg - ma Combine the expressions...
  45. E

    I Summation convention with expressions containing parentheses

    Is (Tii)2 equivalent to (∑i = 1nTii)2? That is, when you encounter parentheses with Einstein summation, you perform the summation first and then apply any mathematical operations indicated by the parentheses? The solutions manual gives a solution to a problem I've been working out seems to...
  46. JonMoulton

    Which gene expressions start to happen in an embryo

    Watching dynamics of RNA expression - paper describing a visualization technique. Movie 1 from supplemental information: in a zebrafish embryo, DNA is stained with red fluorescence and carboxyfluoresceinaed Morpholino oligos targeting dre-miR-430 emit visible green fluorescence when they reach...
  47. TytoAlba95

    Biology Sex-Linked Inheritance: Male & Female Expressions

    Homework Statement In an organism allele for red eye colour is dominant over allele for white colour. A cross is made between a white eyed male and a red eyed female. In the progeny all males are red eyed and females are white eyed. The reciprocal cross leads to all red eyed progeny. Based on...
  48. Orodruin

    Insights The 10 Commandments of Index Expressions and Tensor Calculus - Comments

    Greg Bernhardt submitted a new PF Insights post The 10 Commandments of Index Expressions and Tensor Calculus Continue reading the Original PF Insights Post.
  49. M

    LaTeX Paragraphing Latex expressions

    When I use Latex, the expression always comes out on a separate line. How do I keep the expression on the same line?