Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 20

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 21

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 532

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 533

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 534

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 239

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 240

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 241

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 242

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 261

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 262

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 263

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 264

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 265

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 267

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 269

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 271

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 273

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 275

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 277

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 279

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 281

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 283

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 285

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 287

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 289

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 291

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 293

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 295

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 297

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 299

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 301

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 303

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 305

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 307

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 309

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 311

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 313

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 315

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 317

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 319

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 321

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 323

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 325

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 327

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 329

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 331

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 333

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 335

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 337

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 339

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 341

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 343

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 345

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 347

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 349

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 351

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 353

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 355

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 357

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 359

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 361

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 363

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 365

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 367

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 369

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 371

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 373

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 375

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 377

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 379

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 381

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 383

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 385

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 387

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 389

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 391

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 393

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 395

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 397

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 399

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 401

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 403

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 405

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 407

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 409

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 411

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 413

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 415

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 417

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 419

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 421

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 423

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 425

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 427

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 429

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 431

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 433

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 435

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 437

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 439

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 441

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 443

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 445

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 447

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 449

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 451

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 453

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 247

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 248

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 249

Deprecated: Function eregi_replace() is deprecated in /home/vbaexpr1/public_html/forum/includes/vbformat.php on line 250
VBA Express : Excel - Using Regular Expressions (RegExp) in Excel


 

Excel

Using Regular Expressions (RegExp) in Excel

Ease of Use

Intermediate

Version tested with

2000 

Submitted by:

brettdj

Description:

Scenarios and code using RegExp, a powerful parsing tool. 

Discussion:

The attached file provides seven examples that cover the RegExp Execute, Replace and Test Methods. The examples also show how to create and access submatches and backreferences. The scenarios below are contained in the example file. 1. Extracting the numeric portion of a string. 2. Reversing the order of a persons name. 3. Testing the validity of an email address (assuming simple constraints) and then parsing it. 4. Testing whether the first three characters at the start of a string are found at the end of a string in reverse order. 5. Converting the nth cell reference in a range of Excel Formulae from relative to absolute reference. 6. Testing the validity of a required numeric string input. 7. Removing duplicated alphanumeric strings. 

Code:

instructions for use

			

All code Is contained In the file attachment.

How to use:

  1. Open the file, select an example from the hyperlinked menu page and then press the command button to run that example.
 

Test the code:

 

Sample File:

RegExp Sept 1 2004.zip 81.02KB 

Approved by mdmackillop


This entry has been viewed 2443 times.

Please read our Legal Information and Privacy Policy
Copyright @2004 - 2014 VBA Express