Any questions involving matching text strings to patterns - the pattern is called a "regular expression."
Moderator: General Moderators
kusal
Forum Newbie
Posts: 14 Joined: Mon Oct 22, 2007 12:12 pm
Post
by kusal » Tue Dec 04, 2007 11:48 pm
Here is my problem
<h4 Bla Bla Bla Bla Bla Bla
Bla Bla Bla Bla Bla
Bla Bla Bla Bla Bla Bla
Bla Bla Bla Bla </h4>
I want the content between <h4> tags in a variable, using only one expressions
thnx
Kusal
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Tue Dec 04, 2007 11:49 pm
What have you tried? Have you read any of the previous examples that show how to match the content of a specific tag?
kusal
Forum Newbie
Posts: 14 Joined: Mon Oct 22, 2007 12:12 pm
Post
by kusal » Wed Dec 05, 2007 12:05 am
I did not read previous examples,
I can do it line by line, what want is a way to ignore \n so that I can get it from one expression.
lines between <h4> tags chage, thats the problem
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Wed Dec 05, 2007 12:14 am
What is your current pattern?
kusal
Forum Newbie
Posts: 14 Joined: Mon Oct 22, 2007 12:12 pm
Post
by kusal » Wed Dec 05, 2007 12:24 am
I don't have a clue how to write this
s.dot
Tranquility In Moderation
Posts: 5001 Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana
Post
by s.dot » Wed Dec 05, 2007 2:02 am
The m modifier will look past the \n's
Have a look at the
regex crash course part 1 by chris corbyn
That should help make your task a little bit easier.
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
kusal
Forum Newbie
Posts: 14 Joined: Mon Oct 22, 2007 12:12 pm
Post
by kusal » Wed Dec 05, 2007 11:42 pm
Got it, s modifier is the one that did the trick
Thank you guys for your help