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. B

    Generating Expressions For Electric Flux

    Homework Statement A particle with charge Q is located immediately above the center of the flat face of a hemisphere of radius R as shown in the figure below. (a) What is the electric flux through the curved surface? (Use any variable or symbol stated above along with the following as...
  2. L

    Engineering Simplying the circuit into Boolean expressions [2 Questions]

    Question 1: http://imgur.com/Px0n152 Question 2: http://imgur.com/tZ0beF6 For Question 1, I got: (AB.CD) + [(CD)' . (AB)'] with a "." = multiplication and ' = complement. into (AB.CD) + [(CD+AB)'] I"m not sure how to simplify this further. Question 2 is really long and I would...
  3. V

    MHB Simplifying Logical Expressions [SOLVED]

    [SOLVED] Simplifying Expressions Hello all I am a bit confused about the laws I am learning about right now and attempted some of my own exercises to understand them a bit. I have the problem NOT(a < 20 AND (b < 10 OR b > 10)) and I need to simplify it. From my understanding I can use...
  4. S

    Discontinuity Waves: Deriving the expressions

    Homework Statement A long string of linear mass density μ_1 = 1.0 gr/cm is joined to a long string of linear mass density μ_2 = 4.0 gr/cm and the combination is held under constant tension. A transverse sinusoidal wave of amplitude A _i = 3.0 cm and wavelength λ =25 cm is launched...
  5. binbagsss

    Mathematica Is Mathematica able to solve expressions such as

    (c (qz + (-1 + q) (-1 + (1 + qz)^0.5)))/(h q^2 (1 + z)^2) = d, And to solve for q New to the programme, thanks a lot !
  6. B

    What defines an operator input/output for simple expressions

    Hello. I have some questions on operations. Suppose in the course of a derivation there is a mathematical statement of the form A+1=B+C then "+" is an operator acting on inputs "B" and "C". Question 1: Is the output of the operation "A" or the expression "B+C"? The reason I think the...
  7. James889

    What Does This Regular Expression Mean?

    Howdy, I came across a regular expression i couldn't get my head around. ' there \([^ ]*\)' echo "Howdy there neighbor" | sed 's/there \([^ ]*\)//' returns howdy. It's the subgroup that's a bit confusing. match any sentence which contains banana then a space and then a non-space character...
  8. A

    MHB Simplifying exponential expressions

    Simplify 8p-3 x (4p2)-2/p-5. This is what I got: First thing I did was flip everything to get rid of the negative exponents: p5/8p3x(4p2)2 next thing I did was multiply the 4p2 by 2 p5/ 8p3x16p4Then I subtracted thep5 from the 8p3 p2/8x16p4 and ended up with 1/128p2 I know that the...
  9. M

    Significance of delta in expressions.

    Can you always put numbers directly into an expression which has the delta triangle against its variables? For example Faraday's Law is always shown with the delta triangle on top and bottom yet these are dropped when you use it for calculations; which leaves me wondering why they are there in...
  10. T

    MHB Simplification of Expressions with Exponents

    Evaluate each of the following without using the calculator. how to evaluate without even using calculator?
  11. karush

    MHB *oblique asymptotes of radical expressions

    it seems most oblique asymptotes are mostly with rational expressions but $\sqrt{x^2+6x}$ has the asymptote of $y=x+3$ and $y=-x-3$ I don't know how this is derived since it is not a rational expression thanks ahead:cool:
  12. N

    Translating English Sentences into Logical Expressions with Nested Quanitifiers

    Hello everyone, An example from a homework assignment has me stymied. There are two parts. Here they are: First part: Let M(x,y) be "x has sent y an e-mail message" and T(x,y) be "x has telephoned y," where the domain consists of all students in your class. Use quantifiers to express each of...
  13. G

    Betatron, derivation of expressions

    Hi! I've got a problem with question 5 on this paper: http://www.freeexampapers.com/past_papers.php?l=Past_Papers%2FAEA%2FPhysics%2F2006/ Download AEA-PHYS-PP-MayJune-2006-AEA-Paper-1342.pdf. Starting from b) i), we got that: ε=Δ∅/Δt → W=εe Where W is denotes work, ε is...
  14. J

    Deriving expressions for Linear Expansivity and Young's Modulus

    Homework Statement The equation of state of a system consisting of a cylinder of a certain perfectly elastic material, subjected to an axial load F, is F= CT(L-Li)^2 where Li is the unstretched length, L is the length under a load F when the temperature is T on a selected empirical...
  15. T

    Rewriting complex number expressions

    Homework Statement The mill (single phased) is now affected by a load from a resistor. We assume that the turbine can deliver an infinitely large current without affecting the frequency. figure 1 illustrates the load: http://puu.sh/19GGR The voltage over the capacitor can can be...
  16. P

    Simplifying boolean expressions

    Homework Statement Simplify the following Boolean expressions to a minimum number of literals (a+b+c')(a'b'+c) 2. The attempt at a solution Whenever I tried this I made no progress in reducing the number of literals, I just reordered the expression. (a+b+c')(a'b'+c)...
  17. L

    Complex exponential expressions.

    Homework Statement I just need some kind of explanation in layman's terms of what exactly is going on here. It seems as though I am missing some key element from trig. I am in a Signals class and the book lacks an explanation of the reduction used and ultimately why. Homework...
  18. PhizKid

    Solving limits containing trig expressions

    Homework Statement \lim_{x\rightarrow \frac{\pi}{2}} \frac{tan(2x)}{x - \frac{\pi}{2}} Homework Equations The Attempt at a Solution I was given a couple of hints: use substitution, and that there isn't any need for the tangent double angle formula. I would have never thought to use...
  19. N

    Different expressions for the dipole moment

    Hi In my book (Griffith's) there are two different expressions for the induced polarization, namely P = \frac{N}{\text{volume}}<d> where <d> is the average of the dipole operator and N the number of atoms. The other expression listed is P = \text{Re}[\varepsilon_0 \chi E] where E...
  20. Z

    Two different expressions of Jaynes-Cummings Hamiltonian

    Hi, I have a question about two different expressions of Jaynes-Cummings Hamiltonian H=\Delta_c a^{\dagger}a+\Delta_a \sigma_{+} \sigma_{-} + g (a^{\dagger}\sigma_{-} +a\sigma_{+} ) and H=\Delta_c a^{\dagger}a+\Delta_a \sigma_{+} \sigma_{-} +i g (a^{\dagger}\sigma_{-} -a\sigma_{+}...
  21. M

    Dirac notation expressions as integrals

    Can anyone point me to how to interpret Dirac notation expressions as wave functions and integrals beyond the basics of     <α| = a*(q)     |β> = b(q)     <α|β> = ∫ a* b dq For example in the abstract Dirac notation the expression     |ɣ> (<α|β>) can be evaluated as     (|ɣ><α|) |β>  ...
  22. I

    Mathematica Mathematica does not completely evaluate expressions.

    I've defined A and B to be two affine transformations on \mathbb{R}^2. Then, I defined C and D to be some kinds of compositions of A and B, for example: C = Composition[A,B,B,A,A][{x,y}] D = Composition[B,A,B,A,B][{x,y}] Now, I want to evaluate expressions like: X =...
  23. H

    Range must be bounded by constant expressions

    Homework Statement logic [4:0]counter; logic [WORD_W-1:0] mdr_rite_[counter]; //range must be bounded by constant expressions logic [WORD_W-OP_W-1:0] mar_rite_[counter]; //range must be bounded by constant expressions always_ff@(posedge clock, negedge n_reset) begin if (!n_reset)...
  24. C

    Find the Derivative/Simplification of 2 Rational Expressions

    Homework Statement Find the derivative of: y = [(2x - 5)^4][(8x^2 - 5)^-3] Homework Equations I get: y' = -[(48x(2x - 5)^4) / (8x^2 - 5)^4] + [(8(2x - 5)^3) / (8x^2 - 5)^3] Wolfram gets: http://www.wolframalpha.com/input/?i=derivative+%282x+-+5%29%5E4%288x%5E2+-+5%29%5E-3 The...
  25. A

    Finding voltage and current expressions (capacitance)

    Homework Statement The charge on a 2-microfarad capacitor is given by q(t)=10^-6 * sin(10^5*t) C find the dexpression for the voltage and current? Homework Equations The Attempt at a Solution the answer is v(t)=0.5sin(10^5t) , i(t)=0.1cos(10^5t) i don't get how they found the answer
  26. E

    Geometric expressions for a spandrel cut at an arbitrary point

    Homework Statement I am after finding general geometric expressions for a quarter-circular spandrel that is split into two segments along either its domain or range (they are equal). I.e. Taking the geometry provided in the sketch below (Figure 1) I am after expressions for area and centroids...
  27. W

    Fisher Information Matrix: Equivalent Expressions

    I don't understand the following step regarding the (i,j)^{th} element of the Fisher Information Matrix, \textbf{J}: J_{ij}\triangleq\mathcal{E}\left\{ \frac{\partial}{\partial\theta_{i}}L_{\textbf{x}}(\textbf{θ})\frac{\partial}{\partial\theta_{j}} L_{\mathbf{x}}(\textbf{θ})\right\} \\...
  28. V

    Expressions of travelling harmonic wave equation

    Hi all, apologies if this has been answered elsewhere - I was unable to find an answer using the search function. Homework Statement "Expressed in terms of wavenumber and angular frequency, the equation for a traveling harmonic wave is: y = Asin(kx-ωt). Express this function in terms of (a)...
  29. H

    Expressions accompanying a Christoffel Symbol (a notation question)

    Just been reading on Christoffel Symbols and I am having a notational mind block. Say we have: \Gamma^{k}_{ij} v^{i} v^{j} The velocity depends on this expression, but I don't read this term v^{i} v^{j} as a velocity squared do I? It's just the one velocity, are the superscripts here...
  30. S

    How Do You Pronounce Complex Mathematical Expressions in English?

    I apologise for choosing not so related topic, but I could'n find better one. I will have to read some math expressions in English for audience and I'm not sure how to say it. And when I ask English teacher, they don't know what it means in the first place and can't give me any advise either...
  31. A

    END;Solve 8-Digit Display Error in Boolean Expressions for Student ID Assignment

    I am designing a 7 segment display device to display an 8 digit number The number is: 18008101. I'm using a 555 time circuit for the clock pulse which is connected form output (pin3) to input/clock (pin1) Lattice GAL22V10D, working fine as the number changes on every pulse. However the...
  32. T

    MHB Solving Matrix Norms & Finding Valid Expressions: Help Needed!

    Hi all, I think I have part of the answer to my question but I need some help if you would be so kind. Q: a)Compute the condition number of the following matrix using matrix norms ||A||_1 and ||A||_infinity. [a 1] [1 1] And also: What values of a give a large condition number? So ||A||_1=...
  33. miraiw

    Identities of nested set algebraic expressions

    Are there any useful identities for simplifying an expression of the form: $$((\ldots((x_{1} *_{1} x_{2}) *_{2} x_{3}) \ldots) *_{n - 1} x_{n})$$ Where each $$*_{i}$$ is one of $$\cap, \cup$$ and $$x_1 \ldots x_n$$ are sets? I believe I found two; though I haven't proved them, I think they...
  34. M

    Dipoles and electric field expressions

    Okay. So my assignment is due in an hour and I'm stuck on this last question. If I can get some help, I would greatly appreciate it. So the problem reads: The electric field of a dipole can be calculated by assuming the positive charge q is at z = a/2 and the negative charge -q is at z =...
  35. L

    Some expressions with Del (nabla) operator in spherical coordinates

    Reading through my electrodynamics textbook, I frequently get confused with the use of the del (nabla) operator. There is a whole list of vector identities with the del operator, but in some specific cases I cannot figure out what how the operation is exactly defined. Most of the problems...
  36. C

    Having trouble understanding the relationship between these expressions

    I understand everything up until: √MgL/m = L/t Why is that equal to L/t? I also don't understand this either: This is the problem itself however I don't feel it's that important since I am trying to figure out how they are arriving at their conclusions. An astronaut on a small...
  37. V

    Algebra II Quotients of Rational Expressions

    Homework Statement Simplify. (p4 - q4)/(p + q)2 ÷ 1/(p2 + q2) Answer: (p - q)/(p + q) Homework Equations -- The Attempt at a Solution Transformed it to a multiplication problem. (p4 - q4)/(p + q)2 X (p2 + q2)/1 Difference of the squares in the numerator of the first expression...
  38. H

    How do you simplify the following expressions?

    I'm only in 9th grade math, so please don't give me complicated calculus answers. And I prefer if you give steps on how to solve each step. Thanks in advance! 1. 5^-2/p 2. 3x^-2/y 3. (x^-5) (y^-7) 4. 8/2c^-3 5. (6a^-1) (c^-3)/d^0 6. (9^0) (y^7) (t^-11)
  39. S

    LaTeX LaTex expressions running over following text

    In the past few weeks, I have occasional trouble with my latex expressions (using the itex tag) running over the text that follows them. I also see this in some posts by others. Is there a good way to avoid this? Is it a browser specific problem? ( Mozilla and Firefox are mine.)
  40. 9

    Expressions for the energy density of electromagnetic waves

    I hope this is the right forum for a first year undergraduate problem! The problem I've been working on is here: http://i.imgur.com/IhTtL.png I think that I have the correct answers, but I'm not sure. I think that the energy densities of the E and B field components will be (0.5)(ε0)(E^2)...
  41. B

    Derive expressions for the transvers modulus and the longitudinal modulus of

    Homework Statement A composite material is made from a matrix with a tensile modulus of 5 GPa and two different continuous fibres with moduli of 360 GPa (type !) and 450 GPa (type B) respectively. a) Derive expressions for the transverse modulus and the longitudinal modulus of a...
  42. V

    Algebra II Simplifying Rational Algebraic Expressions

    Hi everyone and nice to meet you. I'm velox_xox a newbie to PF and a high school correspondence student currently taking Algebra II. Since I'm correspondence, I am basically teaching myself my subjects, which means if I don't understand something it's a big problem. I enjoy math, but I must...
  43. D

    E to an imaginary power, equivalent expressions, inequal outcomes?

    I'm completely stumped. So is my high-school calculus teacher, but he hasn't done imaginary powers for forty-five years. Hopefully somebody can explain this... To clarify, I understand the reasoning between the following equation: e^{i x}=cos(x)+i sin(x) Now, I need to put some things...
  44. J

    Drawing a right triangle to simpliy the given expressions

    1. Homework Statement Sin(sec^-1(sqrt(x^2+16)/4)) 2. Homework Equations 3. The Attempt at a Solution I did the math and ended up getting x^2-1 as the opposite, but the answers on the back of the book say other wise.
  45. J

    Drawing a right triangle to simply the given expressions

    Homework Statement Cos(Tan^-1(x)) Homework Equations The Attempt at a Solution Dont know how drawing a right triangle would do anything, don't know what to plug in.
  46. K

    Finding Expressions for Electric Fields with Radius

    Homework Statement A solid nonconducting sphere of radius a has a has a total charge +Q uniformly distributed throughout its volume. The surface of the sphere is coated witha avery thing (negligable thickness) conducting layer of gold. A total charge of -2Q is placed on this conducting layer...
  47. D

    Exact values of inverse-trig expressions

    I would like to know how to solve the following kind of questions: Calculate (without expressions of cyclometric functions): arccos(11/14)+arcsin(-1/7) And: Calculate (without expressions of cyclometric functions): 2*arctan(1/2)+arccos(-3/5) If you could generalize the method of solving...
  48. X

    Need help understanding this: Deriving expressions for spin 1/2 systems

    So this is my first quantum mechanics class and so far we have spent about a month (well 3 weeks) on just the mathematics. So in my book, the author explores the ideas presented by the stern gerlach experiment. It related the beam of silver atoms traveling through the separators to light...
  49. M

    How Does Heat Capacity Change with Volume and Pressure?

    Homework Statement Let C_{X}=T(\partial S/\partial T)_{X} with X=p~or~V. Show that C_{p}-C_{V}=T(\partial S/\partial V)_{T}(\partial V/\partial T)_{p}. Homework Equations C_{p}-C_{V}=T[(\partial S/\partial T)_{p}-(\partial S/\partial T)_{V}] The Attempt at a Solution I honestly don't know...
  50. A

    Complex variables in compound expressions of electrodynamics

    When dealing with electrodynamics it is usual to use complex variables for the electromagnetic field while taking into account that the electromagnetic field is real and that at the end one has to take the real part of the complex solution for the field. However, what happens to compound...
Back
Top