What is Expressions: Definition and 331 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. K

    How Do You Model the Motion of a Mass on a Spring?

    1. A mass attached to the lower end of a vertical spring causes the spring to extend by 25 mm to its equilibrium position. The mass is then displaced a further 20 mm and released. A trace of the vibration and time measurements are taken. From these measurements it can be seen that the...
  2. L

    Harmonic motion, finding analytic expressions for constants

    1. Find analytic expressions for the arbitrary constants A and phi in Equation 1 (found in Part A) in terms of the constants C and S in Equation 2 (found in Part B), which are now considered as given parameters. Express the amplitude A and phase phi (separated by a comma) in terms of C and S...
  3. G

    Finding Exact Values of Trig Expressions w/o Calculator

    Homework Statement Use properties of the trigonometric functions to find the exact value of each expression. Do not use a calculator sin (-pi/12) csc (25 pi)/12 Homework Equations sin (negative angle) = - sin (angle) csc theta = (sin theta)^-1 = 1/(sin theta) The Attempt at a...
  4. A

    Simplfying rational expressions

    Homework Statement 6x (squared) +17x+7 _________________ 2x sqaured + 7x +3 Homework Equations Simplify The Attempt at a Solution 3x+7 is the answer ____ x+3 maybe u can factor 6x by doing 2x (3x) or maybe u don't do that and take 6x (squared +17...
  5. A

    Rational Expressions: Solving Homework with Difficulty

    Homework Statement x (squared) + x - 30 _____________________ x (sqaured) -3x + 2 Find all numbers for which the rational expression is not defined. i know this is really easy stuff, but i have a hard time staying focused in math, and i have to always teach myself with the book, but sometimes...
  6. F

    Simplifying logarithmic expressions

    simplify the following expression log2 4^3x-1 (2 is a subscript of log and 3x - 1 is a superscript of 4) i can rearrange this to 4log2 3x - 1, i am thinking after this it becomes 4 log3 + 4 logx, but i don't know what to do with the -1 please show all the steps and explain.
  7. D

    Find Expression for Cubic Function: f(1)=6, f(-1)=0, f(0)=f(2)=0

    Homework Statement Find an expression for a cubic function (f) if f(1)=6 and f(-1)=f(0)=f(2)=0 Homework Equations The Attempt at a Solution I tried to graph the points and find an equation for the function, but couldn't.
  8. H

    Zero Integrals: The Theory Behind Evaluating Expressions

    what is the theory behind ...if close integral of a expression is zero..then the expression is itself zero
  9. T

    Simplifying Trigonometric Expressions

    Homework Statement I'm not sure if you can ask about two questions in one thread; they are very similar. If it's not allowed I can make a second thread and edit this one. Simplify the expressions: 1. sin^3 theta + cos^3 theta / sin theta + cos theta 2. 2-tan theta / 2 csc theta-sec...
  10. maverick280857

    Problem with Path Integral Expressions in Peskin And Schroeder Section 9.1

    Hi again everyone, I have some doubts about the path integral expressions given in Section 9.1 of Peskin and Schroeder (pg 281 and 282). For a Weyl ordered Hamiltonian H, the propagator has the form given by equation 9.11, which reads U(q_{0},q_{N};T) = \left(\prod_{i,k}\int dq_{k}^{i}\int...
  11. J

    Factoring expressions with negative exponents

    Homework Statement Factor 3x (4x-1)^-2 - 6x^2 (4x-1)^-1 Homework Equations The Attempt at a Solution
  12. J

    Regular Expressions and Yahoo Pipes

    I'm trying to create an rss feed from a html table on the main page of a web forum. I want to do this because the table displays the new posts. I use yahoo pipes and you can see my attempt here: http://pipes.yahoo.com/pipes/pipe.info?_id=0e72fee43090386fddbc9191f5cddc86 The pipes work up...
  13. D

    Factoring Algebraic Expressions with Fractional Exponents

    Homework Statement (4x-1)^{1/2}-1/3(4x-1)^{3/2}Homework Equations The Attempt at a Solution I think the GCF is (4x-1)^{1/2}. So, I get (4x-1)^{1/2}(1+(-1/3(4x-1))) = (4x-1)^{1/2}(-4/3x+4/3) = -4/3(4x-1)^{1/2}(x-1) However, the answer in the book is 4/3(4x-1)^{1/2}(x-1). I've done it several...
  14. K

    Coming up with recursive and closed form expressions

    Homework Statement I am having some trouble coming up with recursive and closed form expressions of different sequences. I realize helping me with this would pretty much just be giving me the answer, but if anyone could also help me with how to think of the answers that would be nice. 1) Cn =...
  15. O

    Calculating Real Values of Expressions

    i'm not sure whether this is the right place to post this but i need to know what a real value of an expression is. also can anyone tell how i could find the least possible real value of an expression.
  16. C

    Testing if real-valued expressions are negative

    In his famous (but unknown to me until recently) 1967 paper,* Richardson showed that the problem of deciding whether a one-variable subelementary expression (an expression involving +, -, *, exp, sin, composition, the constants log 2, pi, and all rational numbers, plus variables x_i) is negative...
  17. O

    Simplifying Expressions Involving Square and Fourth Roots

    I was looking over a problem to make sure I hadn't messed up my arithmetic and I put the term (-SQRT(18-12SQRT(2))/6 into my calculator and it reduced it to (2SQRT(3)-SQRT(6))/6. I found approximate values for these two expressions and they were in fact equal. So my question is, how does one...
  18. K

    Higher order difference expressions

    Hello. I need finite difference expression of sixth order derivative in h^2. I derived it using Mathematica 6 but when I use the expression there appear a problem. Solution is wrong. I check everythin and realized that only i m not sure about that expression. I ll be appreciated if you help...
  19. R

    To divide radical expressions; quick question, are these equivalent?

    Homework Statement There is no problem, ^title^, just a quick question :) The book's answer: \frac{x\sqrt{x}-x\sqrt{2}+2\sqrt{x}-2\sqrt{2}}{x-2}} My answer: \frac{x+2\sqrt{x}-x-2\sqrt{2}}{x+2} I combined like terms in the numerator... at least I think I did it correctly?
  20. Mentallic

    Evaluating Integral Expressions - No Sq. Units

    I'm asked to evaluate: \int_{-1}^{1} x(x-1)(x+1)dx The problem is that the question doesn't say anything about area, and we have been notified in class that unless otherwise stated, don't express the answer in sq. units. However, I also have a problem that, if this were to find the area...
  21. J

    Vector expressions - equivalence

    Homework Statement A car is traveling at 12ms^-1. To the passenger in the car the wind appears to be blowing at 8.0ms^-1 at right angles to the road. What is the magnitude and direction of the velocity of the wind with respect to the ground. Homework Equations I can think of two...
  22. R

    Write expressions for simple harmonic motion

    Homework Statement Write expressions for simple harmonic motion (a) with amplitude 10 cm, frequency 5.0 Hz, and maximum displacement at t=0; and (b) with amplitude 2.5 cm, angular frequency 5.0 1/s, and maximum velocity at t=0.Homework Equations \begin{gathered} x(t) = A\cos (\omega t +...
  23. C

    Understanding the behaviour of exponential expressions

    Hi folks, hope somebody can help me understand this one please? Gven an expression i = ia-ic = icorr(exp(n/Ba)-exp(-n/Bc)), we are told that if -n<<Bc then exp(-n/Bc) tends to 0 & the equation becomes i (is approx) = ia = icorr exp(n/Ba). I find that exp(-n/Bc) tends towards 0 if I...
  24. F

    Differentiating expressions involving multivariable vector valued functions

    Not really a homework problem... just a general question (this seemed like the place to put it...). Say I have three functions: f,g,h:\mathbb{R}^2\rightarrow\mathbb{R}^3 and an expression along the lines of: \left\langle f(u_1,u_2),g(u_1,u_2)\right\rangle h(u_1,u_2) What...
  25. P

    How do you add Rational Expressions when youre in University Math?

    Cross multiply ... and then multiply by the common denominator... how do you do it do you do it in your head..by cross multiplying or the other way It seems like cross multiplying is less formal ...and I don't know if its 'right' to take the shortcut --since you have to do this...
  26. G

    Expressions without absolute value signs

    Homework Statement Rewrite the following expressions without absolute value signs, treating various cases separately where neccesary Homework Equations a-Abs[(a-(abs)a)] the question is do i have 2 answers to this ?
  27. R

    Symmetric Axial Vector Torque and Uniform Forces: Exploring Equivalence

    Would it be possible for a symmetric axial vector torque to be equivalent to the shear stress of two uniform rectilinear forces? as they seem to be non-related, but it works out that they should be.
  28. F

    Finding Simplicity in Summation Expressions

    Hi, there is a good expression for \sum_{s}{u_s(\vec{p})\bar{v_s}(\vec{p})} ? Thank you
  29. W

    I need some serious help: trig expressions, OY

    Here is my problem: (sec 2 x csc x) / (sec 2 x + csc 2 x) -first i replaced the denominator with its identities.. and i got : 2+tan^2 x +cos^2 x but the numerator.. can you just .. i really think I'm doing this wrong.. ugh, and i cannot stand it! Honestly, i would be truly gratful for...
  30. W

    How do I solve these trig expressions?

    I do not understand these problems; I understand the trig basics (identities, inverses, and a bit more), but I have'nt got a clue of where to start with these: (sec 2 u - tan 2 u) / (cos 2 v + sin 2 v) [ (sec y - tan y)(sec y + tan y)] / [sec y] and this one: cos x - cos 3 x...
  31. R

    Solve Rational Expressions: x/20 = (3/8)-(4/5)

    1. x/20 = (3/8)-(4/5) 2. solve 3. My attempt as far as I can tell there is no LCM so 3/8 becomes 15/40 4/5 becomes 32/40 (15/40)-(32/40)= 17/40 which equals 8.5/20 which means x=8.5 For some reason I don't think I got the right answer?
  32. N

    Solving Propositional Logic and Quantifier Expressions

    Not sure where to post this subject, so if it is in the wrong location please forgive. 1. Restore the parentheses to these abbreviated propositional forms? Q \wedge \backsim S \vee \backsim ( \backsim P \wedge Q ) I got this, but am not sure if it is correct. [Q \wedge (\backsim S)]...
  33. M

    Explicit expressions for creation/annihilation operator of the free scalar field

    I've been trying to work my way through some of my lecture notes, and have hit this snag. (n.b. I use k_0 \equiv +\sqrt{\vec{k}^2 + m^2}) We have a(q) = \int d^3 x e^{iqx} \{ q_0 \phi(x) + i \pi(x) \} a^{\dagger}(q) = \int d^3 x e^{-iqx} \{ q_0 \phi(x) - i \pi(x) \} To calculate the...
  34. N

    Two expressions for work - which is correct?

    When I want to find the energy in a system containing two points charges q and -q, I can use the following formula: W = -Q\int_{\bf{a}}^{\bf{b}} {\bf{E}} \cdot d{\bf{l}} = Q(V(\mb b) - V(\mb a)) If my reference point is set to infinity, I can rewrite the last expression to: W=QV(\mb r) The...
  35. S

    Graphing expressions without given values?

    This isn't really a homework problem. I'm studdying for the AP Physics C: mechanics test by working on practice free response problems that my teacher gave me. My question pertains to a problem in the 1993 set of questions. Let's say, for example, a car moves to the right with a constant...
  36. R

    Algebraic expressions - simplifying

    Hi all, I'm retaking the GRE soon and I keep making stupid algebra mistakes in my calculus problems so I'm going through a textbook from 1965 that is helpful but has me stumped on some problems. I hope someone can steer me in the right direction. 1/(a-b)(a-c) + 1/(c-a)(c-b) +...
  37. T

    Expanding Exponent Expressions

    Hi, I don know how to go about expanding things such as 3x\sqrt{3x-1} apparently that equals 12x^{2} - 4x i know that 3x\sqrt{3x-1} can be written as 3x(3x-1)^{\frac{1}{2}} but i don't know what to do. I can't remeber. Thanks :)
  38. P

    Rational expressions very simble, but hard for me

    \frac{5x-5y-bx+by}{5x-5y+bx-by} i can't cancel anything i can't factor anything please help
  39. E

    MATLAB How to Multiply a Value by a Matrix in MATLAB?

    Hi, this isn't a homework question as such, but I'd appreciate some advice as it is a part of a project that I'm doing. I'm trying to write some MATLAB code and need to create a matrix and multiply some value by this matrix ie. R(*)=[cos(*) sin(*) 0; -sin(*) cos(*) 0; 0 0 1] but I'm not...
  40. M

    Multiplying Rational Expressions

    Homework Statement \frac{5(y-2)}{y+1} x \frac{y+1}{10} Homework Equations The Attempt at a Solution Does this equal 5(y-2)(y+1)/10(y+1) ? Or are there no brackets on that first y+1 ?
  41. E

    How many ways can you express n as the sum of positive integers?

    [SOLVED] expressions of integers Homework Statement Let n be a positive integer. How many ways can you express a as the sum of positive integers? Order of addition does not matter. EDIT: change "a" to "n" in the second sentence Homework Equations The Attempt at a Solution Let f(x) be the...
  42. Holocene

    Why Do These Mathematical Expressions Seem Unequal?

    In order to see the problem here, you need to refer to following link: http://img.photobucket.com/albums/v224/TurbineSpeed/Picture402887.jpg I understand how they got the expression in the numerator. What I cannot figure out is how they got the denominator. By their math, (x-4)(x+1) +...
  43. E

    Rationalizing cubed expressions

    I know how to rationalize most equations when trying to find limits. However, this problem seem give me trouble. (((1+x)^3)-1)/x as x approaches 0 I tried the method of multiplying by the conjugate but it doesn't seem to get me anywhere. Mainly its the cubed (1+x) that troubles me.
  44. I

    Translating into first order predicate expressions

    Homework Statement I have been given the following predicates of the domain of real numbers Homework Equations P(x): x>0 E(x): x is even D(x): x is exactly divisable by 5 (i) At least one integer is even (ii) There exists a positive integer that is even (iii) If x is...
  45. X

    Simple Graphing rational expressions question

    How do you find the point where the graph crosses the oblique asymptote?
  46. M

    Simplifying Trig Expressions and cofunctions

    Homework Statement Sec^2x X cotx --------------------- csc xAlso, if anyone wants to explain cofunction identities and how to use them, to be that would be very much appreciated. Homework Equations The Pythagorean identities as well as the basic identities of trig functions. Any...
  47. J

    Can some functions not be written with elementary functions?

    I've heard it is possible to prove, that some functions, for example defined with integral expressions, cannot be written with elementary functions (in somehow finite manner). Since I don't have a clue of how these things are proven, I'm now merely asking, that what kind of proofs these proofs...
  48. Y

    Rotation Matrix: Finding Two Expressions & Verifying Equivalence

    Homework Statement A vector x in R^2 is rotate twice through an angle theta (it is rotated through theta and again through theta). Find two expressions for the matrix representing this rotation. Verify that these two expressions are equivalent Homework Equations rotation matrix R=[cos...
  49. P

    How to find algebraic expressions?

    How do you find an equivalent expression free of trig funtions for g(b)=cos(arctan(b))? :confused:
  50. C

    Adding and subtracting Rational Expressions

    I'm stuck on how to do this problem My attempt: the answer to the second one is 3x + 2/(x+2)(x-2) Can someone point out my mistake?
Back
Top