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.
The way i am evaluating post fix expressions is not working with exponents
Example
InfixII
3*(4^2-2/3)+4
To post fix
342^*23/-4+
=16*3-2/3)+4
Am i evaluating the parenthesis the wrong way
Homework Statement
Find the Values of B and C given this:
\frac{(3x-18)}{(2x+1)(7x-3)}= \frac{B}{2x+1} + \frac{C}{7x-3}
Homework Equations
The equation given:
\frac{(3x-18)}{(2x+1)(7x-3)}= \frac{B}{2x+1} + \frac{C}{7x-3}
The Attempt at a Solution
My attempt:
\frac{(3x-18)}{(2x+1)(7x-3)}=...
The purpose of this tutorial is to provide students of algebra with techniques and tips for factoring quadratic expressions. In my experience as a tutor, I have found this can be one of the more difficult and challenging topics for students.
I invite anyone with any techniques of their own to...
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...
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...
[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...
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...
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...
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...
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...
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...
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:
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...
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...
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...
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...
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)...
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...
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...
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...
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_{+}...
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
(|ɣ><α|) |β>
...
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 =...
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)...
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
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...
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\}
\\...
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)...
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...
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...
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...
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=...
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...
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 =...
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...
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...
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...
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)
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.)
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)...
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...
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...
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...
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.
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.
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...
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...