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. 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...
  2. M

    Expand and Simplifying Algebraic Expressions

    Homework Statement Expand and simplify algebraic expressions. Homework Equations (2a+1)(3a-1)(a-2) The Attempt at a Solution The problem is, we normally always do these problems with only two sets of brackets. I tried just multiplying each number will each other number but it...
  3. C

    Help proving equality of matrix expressions

    I've been beating my head against this problem for hours. I see numerically that two expressions are equal, but I can't prove it: (J^{T}R^{-1}J + P^{-1})^{-1}J^{T}R^{-1} = PJ^{T}(JPJ^{T} + R)^{-1} J is arbitrary size, P and R are square though not necessarily equal. Can anyone...
  4. T

    Separating variables within square root expressions

    Please see attached. This is a general question for a more complex thermo problem, but it fits this form. Are there any tricks to getting expressions out of square roots in solving DEs? y=y(x) x=x(t) I want to get y by itself so I can integrate with respect to x, but it is trapped in a...
  5. P

    Interpreting Math Expressions: Uncovering the Rules

    I wanted to know if there are any rules for interpreting mathematical expressions. If we succeed in interpreting a mathematical expression as a physical reality we will make math more friendly and very interesting. What are the rules for interpreting math expressions?
  6. E

    Simplifying cosine and sine expressions

    Homework Statement So I am a little rusty on my basic math and I am trying to simplify this expression. In case you were curious the expression came from a signal block diagram that I calculated the transfer function H(z) to then found the frequency response H(f) and I think i have done that...
  7. H

    How Are Planck Time and the Expression \(\sqrt{\frac{\hbar c^5}{G}}\) Related?

    take this derivation \hbar c = GM^2 multiply c^4 on both sides \hbar c^5 = GM^2c^4 rearrange \frac{\hbar c^5}{G} = M^2c^4 Take the square root makes \sqrt{\frac{\hbar c^5}{G}} = E Now this \sqrt{\frac{\hbar c^5}{G}} expression inside the radical expression is...
  8. U

    Tool for Creating Calculus Expressions

    I read the forum rules regarding posting strictly in the format laid out; I hope this is a legitimate post. Thanks for understanding! Homework Statement As a Calculus II student in high school, I have been in increasing need of a means to create calculus expressions that can be emailed or...
  9. D

    Deriving expressions for angular velocity and acceleration

    Homework Statement Derive the expressions for the i_r and i_θ components of velocity and acceleration. Homework Equations r=|r|i_r \omega=\frac{dr}{dt} \alpha=\frac{dω}{dt}=\frac{d^2r}{dt} The Attempt at a Solution r=|r|i_r \omega=\frac{dr}{dt}i_r+r\frac{di_r}{dt}...
  10. X

    Where do these expressions for energy densities come from?

    Hello all! I am getting into the electromagnetic waves section in my optics class and in some of these derivations, they are using expressions that I cannot remember how they were derived or the context of them. My book from my E&M class I took awhile back is currently at my house and I am at...
  11. N

    Different expressions for the polarization

    Hi People usually write the (total) polarization like this P(t) = \epsilon_0(\chi^{(1)}E(t)+chi^{(2)}E(t)^2+\ldots) where χ is the susceptibility. But in my book I see they write it like this P(t) = \varepsilon _0 \frac{1}{{2\pi }}\int\limits_{ - \infty }^\infty {\chi ^{(1)}...
  12. I

    Equivalent Expressions: Solve Energy Spectrum Transcendental Equation

    In my research project I arrived at a particular case where the energy spectrum is given by the following transcendental equation \sqrt{-\frac{E}{E+V_D}}=\tan\frac{a\sqrt{\frac{2m}{\hbar^2}(E+V_D)}}{2} In the literature I found the equivalent expression below \cot...
  13. X

    Perceived Ambiguity in Factoring Polynomial Expressions

    As it turns out, this first part was an extremely pervasive user error that I have not seen for days. Still, though, it is interesting that equations can be factored in many different ways, so I will post that here instead: 3x^3 = -5x^2 +2x -3x^3 -5x^2 + 2x = 0 Factored: x(-3x+1)(x+2) and...
  14. Dembadon

    Multi-Variable Calculus: Cross Product Expressions

    I would like to check my answers... Homework Statement Given nonzero vectors u, v, and w, use dot product and cross product notation to describe the following. A vector orthogonal to u X v and u X w A vector orthogonal to u + v and u - v A vector of length |u| in the direction of v...
  15. R

    Question on deMorgans law on simplifying boolean expressions

    Homework Statement I'm sure you all know deMorgans law on simplifying boolean expressions, I just can't seem to get it. It doesn't make sense to me, like ([not]x.[not]y) = [not]x + [not]y].2. The attempt at a solution I tried it and I don't know why it doesn't work for me ie. ([not]1.[not]0) =...
  16. O

    2D Ising Model (analytical expressions)

    Hi all, I am doing a program to simulate the 2D Ising Model under the metropolis algorithm. In order to check my results I would like to compare them with the analytical expressions for the mean energy, magnetization, specific heat and magnetic susceptibility. I already found the...
  17. O

    2D Ising Model (analytical expressions)

    Hi all, I am doing a program to simulate the 2D Ising Model under the metropolis algorithm. In order to check my results I would like to compare them with the analytical expressions for the mean energy, magnetization, specific heat and magnetic susceptibility. I already found the...
  18. R

    Deriving expressions for creation/annihilation operator

    hey guys!I really need help in getting from the real classical solution of the Klein Gordon equation to the expression of operators! I start from: \varphi(x) = \int \frac{d^3 k}{(2\pi)^3 2\omega} [a(\textbf{k}) e^{ikx} + a^{*}(\textbf{k}) e^{-ikx}] and should arrive with \int d^3 x \...
  19. S

    How Can I Correct My Python Regular Expressions Code for Analyzing Swallow Data?

    Homework Statement This isn't really a homewrok/coursework question, but I didn't know where to put it. I'm trying to teach myself python over the summer and I seem to have got stuck on regular expressions. I want to read a .txt file with data for various kinds of swallows, laden/unlden...
  20. K

    Need help to prove expressions using Fourier Expansion

    Dear all, Please help me to prove the Fourier expansion for three different cases as follows. I need some help to show that L.H.S = R.H.S Case1: when m not equal to 0 and n not equal to 0. dU^0/dz (1- x/a) - dU^a/dz (x/a) = -(2/m^2 Pi^2)(1- Cos[m*Pi]) [dUn^0/dz - dUn^a/dz] Case2...
  21. O

    LaTeX Suggesting Inline LaTeX Expressions in Learning Material

    I recently found out that every LaTeX expression I type is displayed in a new line. I had to search https://www.physicsforums.com/showthread.php?t=499624" tread or any of its links. May I suggest that how to type inline expressions be included in the LaTeX learning material? It would be...
  22. D

    How Do You Differentiate Complex Functions Involving Exponents and Operations?

    Homework Statement If f(x) can be differentiated, find expressions for the derivatives of the following functions. a) g(x) = f(x6) b) h(x) = [ f(x)]6 c) f(x) = x2/ f(x) The Attempt at a Solution a) b) Use the product rule first then multiply that expression by the expression for...
  23. D

    When we say that two algebraic expressions, [tex]f(x_1,x_2,\cdots

    When we say that two algebraic expressions, f(x_1,x_2,\cdots x_n), g(x_1,x_2,\cdots x_n) are identical, or f(x_1,x_2,\cdots x_n)\equiv g(x_1,x_2,\cdots x_n), we mean (according to my textbook) that \forall x_1,x_2,\cdots x_n: f(x_1,x_2,\cdots x_n)=g(x_1,x_2,\cdots x_n) However, does that mean...
  24. H

    Equating Truth Table Expressions: A NAND Solution

    Wasn't sure of where the most appropriate place would be for this post. If you have a truth table, say for inclusive OR, then you get a sums-of-products expression: (A * B^c) + (A^c * B) + (A * B) From this, how could I arrive at the following: A + B = ((A + B)^c)^c = (A^c * B^c)^c...
  25. Shackleford

    Simplifying Expressions: Understanding 1/4k

    I'm not seeing how you get 1/4k = (1/2)k(1/2)k(1/2) I understand why you can factor out the (1/2). It's in each term of the sum. http://i111.photobucket.com/albums/n149/camarolt4z28/Untitled-2.png?t=1297227186 I haven't really looked at this crap in four years.
  26. W

    How do you expand algebraic expressions to the nth power?

    I would like to start by saying that I'm not at school, I'm 40 years old, and learning calculus for the first time - personal, private study - so anyone helping me out won't be giving me the answers to any course work or school work. I don't have a teacher, and there's no one I can ask who can...
  27. C

    Help Needed: Deriving Expressions for Mass-Spring System

    Could somebody help me in deriving the following expressions? I can judge that the first equation is a common expression for finding Keq for a mass-spring system in series.. Can't do the rest :/ anybody please ? Thanks in advance.
  28. A

    Mathematica How to factor a expressions in a matrix with mathematica 7?

    Hi, is there a way to factor expressions in matrices? for example In[1]:= MatrixSimplify[{{3/2, 5/2}, {9/2, 1/2}}] (*I just made up the name MatrixSimplify*) Out[1]:= 1/2 * {{3, 5}, {9, 1}} I tried with Simplify[] and with Factor[] but it didn't work, it seems they just simplify every...
  29. N

    Why is psi equal to psi' in vector expressions in QM?

    Hi guys I am reading a book, where they use vector expressions a lot. In it they write {\bf{M}} = \sum\limits_{\psi ,\psi ',\sigma ,\sigma '} {\left\langle {\psi '} \right|\left\langle {\sigma '} \right|{\bf{m}}\left| \sigma \right\rangle \left| \psi \right\rangle a_{\psi ',\sigma '}^\dag...
  30. E

    Alternate expressions of Fourier series formula

    Homework Statement Show that the Fourier series formula F(t)=\frac{1}{2}a_{0}+\sum^{\infty}_{n=1}(a_{n}cos(nwt)+b_{n}sin(nwt)) can be expressed as F(t)=\frac{1}{2}a_{0}+\sum^{\infty}_{n=1}c_{n}cos(nwt-\phi_{n}). Relate the coefficients c_{n} to a_{n} and b_{n}. Homework Equations We...
  31. M

    Simplifying boolean expressions

    i have two boolean expressions that I'm simply stuck on. (any variable with the ' mark means NOT). i used http://hopper.unco.edu/KARNAUGH1.1/Function.html" to check my answers for both..apparently they are both supposed to equal 1. i have tried solving the expressions multiple times, and each...
  32. T

    Simplifying Trigonometric expressions

    Homework Statement Hey guys, having a trig brain fart here, can you point me in the direction of simplifying: \frac{6cos\vartheta}{2sin\vartheta-3cos\vartheta} or is it as simplified as it gets? \ Homework Equations Thought about using double angle formula The Attempt at a...
  33. P

    Simplifying Expressions: 1/2 - 4/d

    Homework Statement Express in simplest form. 1/2 – 4/d divide by 1/d + 3/2d Homework Equations LCF The Attempt at a Solution I know the LCD is 2d. But would you multiply this to the equation
  34. jegues

    Engineering Boolean expressions for larger MOSFET circuits

    Homework Statement See figure. Homework Equations The Attempt at a Solution I tried breaking the circuit down into a bunch of small logic gates but I'm having a tough time putting things back together into one big circuit. (One boolean expression) So far I've determined that...
  35. X

    Simplifying Boolean Expressions: Minterms & Sum of Products

    Homework Statement F= A'C+A'B+AB'C+BC Express the function as sum of minterms, and find the ninimal sum of products. Homework Equations The Attempt at a Solution How do I do this? I really don't know. I know it is easy though. Any help is appreciated!
  36. K

    Regular Expressions for Strings with Specific Character Patterns

    Homework Statement Σ = {a,b} find regular expression for 1)all strings that haven't got more than 3 a's 2)all strings that have a number of a's that is divisible by 3 3)all strings that have the substring aaa only one time The Attempt at a Solution 1) b*Ub*ab*Ub*ab*ab*Ub*ab*ab*ab* 2)...
  37. R

    Simplifying Boolean Expressions using the Laws of Boolean Algebra

    EDIT: My apologies if I started this thread in the wrong forum! Homework Statement Z = P.Q.R + P.R Where . = AND + = OR ~ = NOTHomework Equations (Commutative Law) A+B = B+A, A.B = B.A (Associate Law) (A+B)+C = A+(B+C), (A.B).C = A.(B.C) (Distributive Law) A(B+C) = AB+AC...
  38. T

    Simplifying Logarithmic Expressions to \log_x{y}

    Homework Statement Simplify (\log_a{b})(\log_b{c})(\log_c{d}) in terms of \log_x{y} Homework Equations The Attempt at a Solution well , the furthest i can reach is \frac{\log_xd}{\log_xa} , how do i express in terms of \log_x{y}
  39. V

    Control Systems: Frequency response Bode plots and analytical expressions

    Homework Statement Find analytical expressions for the magnitude and phase of the frequency response for each G(s) below: (a) G(s)\,=\,\frac{20}{s\,\left(s\,+\,5\right)\left(s\,+\,5\right)}(b) G(s)\,=\,\frac{2\,\left(s\,+\,5\right)}{\left(s\,+\,1\right)\,\left(s\,+\,10\right)}(c)...
  40. B

    Different expressions for group velocity

    Homework Statement Ok so we have different expressions for group velocity, g... The most obvious being g = dw/dk But then the text I am using says sinve w=vk we can write g = v+k dv/dk alongside other expressions, including k etc.. My question is - what is v in the equation...
  41. H

    Evaluating Expressions with Kronecker Delta

    Homework Statement Simplify/Evaluate these expressions involving the Kronecker delta, using Einstein's summation convention: a)\delta_{qr}\delta_{rp}\delta_{pq} b)\delta_{pp}\delta_{qr}\delta_{rq} Homework Equations \delta_{ij}=0 when i =/= j \delta_{ij}=1 when i = j The Attempt at...
  42. F

    Real-Variable Expressions of cosh(z) & Finding Complex Zeroes

    Homework Statement express cosh(z) in terms of functions with real variable only, hence find all complex zeroes and mark on argand diagram. The Attempt at a Solution I did cosh(z)=cosh(x+iy) then got down to cosh(z)=cos(x)cos(y)-sin(x)sin(y)... can anyone confirm this please? also i got...
  43. B

    Expressions for the group velocity

    Homework Statement Okay so I've been deriving various expressions for the group velocity starting with g=dw/dk then g=v+kdv/dk also g=v-lambda dv/dlambda (*) then finally g=c/u(1+lambda/u (du/dlambda)) Ok so finally I am asked to use equn (*) to derive the following expression...
  44. I

    Boolean expressions for Turing Machine

    Hello, I want to express Non-Deterministic Turing Machine constraint with boolean expression. The constraint is: "Cells which aren’t being read remain the same at time t+1". lets say H[i,j] means the read/write head at time i at cell j and S[i,j,k] means the symbol k at time i in cell j so the...
  45. G

    How do I simplify these expressions in my maths test?

    I got the following 2 questions in a recent maths test. Can anyone please explain the correct way to simplify these expressions? 4u to the power of 3 v to the power of 6 / 8u to the power of 2 v to the power of 3 3x to the power of 6 y to the power of 5 z to the power of 3 / 9x to the...
  46. H

    Same expressions, but different functions

    f(x) = x/x g(x) = 1 so... those are different functions? i don't know how to treat expressions like that. When expression is not defined for some x=a, but after some algebraic transformations i get expresion defined for x=a ... what happends? Can i make algebraic transformations on...
  47. G

    Vector Calculas: Simplifying expressions

    Homework Statement (a -b) \cdot (b - c) \times (c - a) Homework Equations The Attempt at a Solution Honestly I have no idea where to being. I believe this expression is a scalar triple product but I do not know how to use the properties to simplify this expression. Sorry, kind...
  48. H

    Various expressions for the kinetic energy

    Homework Statement Suppose that a hole is drilled through the center of Earth to the other side along its axis. A small object of mass m is dropped from rest into the hole at the surface of Earth, as shown above. If Earth is assumed to be a solid sphere of mass M and radius R and friction is...
  49. T

    Defining Expressions from the Equation of State

    Homework Statement Starting from the expression for g(E) derived in the lectures, show that for a solid of volume V containing N free electrons which obey Fermi-Dirac Statistics, E_F, k_F, and v_F can be expressed as: E_F = \left( \frac{N}{V} \right)^{1/3}(3\pi^2)^{2/3}\left(...
  50. N

    Breaking this expressions into areas.

    \sum_{n=-\infty}^{\infty}r^{|n|}e^{inx}=\sum_{n=1}^{\infty}e^{inx}+ r^{0}e^{0} +\sum_{n=-\infty}^{\infty}r^{n}e^{-inx} if we look at the left side i have been told that it was broken by intervals the left most is for n=1.. infinity the central is for n=0 the right most for n=-1 ..-infinity i...
Back
Top