David Smith

David Smith

  • NA
  • 2k
  • 0

Regular Expressions Help needed Urgent

Sep 19 2011 6:41 PM
Quick Expression Help.

How to select all text below or all text within the bracket.  I also want the bracket along with the text.

Can someone assist me
-----------------------------------------------------------------------------------------------------




{

{

--- Getting started with Expresso ---

Try clicking the "Run Match" button (or F5) to see what
happens. After a successful match click in the results box
to highlight the matched text. Click the "Replace" button
using the "Dates" example. Notice in the results box that the
format of all the dates has been altered. Using the
"Expression Library" tab double-click another regular
expression and "Run Match".

Click "Show the Builder" (or Ctrl+D) to start designing your
own regular expressions; or enter them directly in the
regular expression box. Enter the text you want to search in
the sample text box.

Expand nodes in the "Regex Analyzer" to see a description
of the current regular expression. Right-click a node to edit
the expression.

--- Sample text ---
Comma Separated Values
a,b,c,d,e
Dog,Cat,Puppy

US phone numbers, (800) 325-3535, (650) 555 1212
US zip codes, 95076-1234, 90210-6473
Dates:12/25/02 9/11/2001 11/22/63 12/7/41

URLs:
http://www.usgs.gov
http://www.acl.lanl.gov/URI/archive/uri-archive.index.html
ftp://@host.com/
ftp://host.com/
ftp://foo:@host.com/
ftp://[email protected]/%2Fetc/motd
file://vms.host.edu/disk$user/my/notes/note12345.txt
prospero://host.dom//pros/name

IP addresses:
123.54.63.0
255.257.0.1  -> This one has an illegal number
0.255.255.12

UK Postal Codes:
M1 1AA
M60 1NW
ABD3 7BB -> This is an illegal format
M1 1CA -> This has illegal letters (CIKMOV) in the second half
W1A 1HQ

Canadian Postal Codes:
A1A 1A1
B6C 8X7
5 Shoreham Drive, Downsview, Ontario, M3N 1S4

Netherlands Postal Codes:
1234 ZA
5678 KL
0123 AZ -> Illegal number, must be 1000-9999
5432 ABQ -> Too many characters

 
Here is some text as bait for the multiple captures example:
XYZAbcAbcAbcXYZAbcAb
acacacac

   Paris
   in the
the spring

{a[b(c)d]e}

Email:
[email protected]
[email protected]

Hyperlinks
<a href="http://www.codeproject.com">The Code Project</a>
Href="http://ultrapico.com/Expresso.htm"

Key-Value Pairs
FurryAnimal=Dog
NonFurryAnimal=Turtle

HTML Tags
<p>Hello World</p>
<H1>Regular Expressions</H1>

Social Security Numbers
123-45-6789
987-65-4321

Mastercard
5134567890123456
Visa
4234567890123
Amex
343456789012345
Diners Club
30045678901234
Discover
6011567890123456

Numbers
123.56
-234.5
12
+13
0.56
-.2
.3
25.
1.38E-23
0.2E45
6E+19
0AFD
1CA0234F

}
}

Answers (1)