Regular Expressions

6K

Solutions

7

Articles & Videos

5K

Contributors

A regular expression ("regex") is a sequence of characters that define a search pattern, mainly for use in pattern matching with strings, or string matching, i.e. "find and replace"-like operations. Regular expression processors are found in several search engines, search and replace dialogs of several word processors and text editors, and in the command lines of text processing utilities, such as sed and AWK. Many programming languages provide regular expression capabilities, some built-in, for example Perl, JavaScript, Ruby, AWK, and Tcl, and others via a standard library, for example .NET languages, Java, Python and C++ (since C++11). Most other languages offer regular expressions via a library.

Refine results

I need to test if a variable is any one of the following:

botwsitecoredevcms
botw-web
accountopening
wuatlive
wuat2live
wuat3live
testlive1
testlive2
testlive3
testhoplive1
testhoplive2

620 views
Gigs: Get Your Project Delivered by an Expert
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Hi folks.

I am in need of some help to parse a file named input.log  It basically looks like this:

Server:            200.200.200.200
Address:      200.200.200.200#53

** server can't find …

1144 views

I want to  allow only numbers and decimal point.  For example 11 or 12.5

No alpha characters.

I tried these 2 regular expressions. They don't allow any alpha except for letter e.

Why? Is …

1436 views

the words must be 6 to 8 characters long and may not contain spaces??

list:

mamamia:lamina1
mer:1234567
acmilan:abc
internazionale:abcd1234
internazionale:abcd123456
mariano:1234567!

214 views

I am trying to use a regex that will turn

"CN=Substitute Staff Group,OU=Roles,DC=domain,DC=org"

into

"Substitute Staff Group"

335 views

I have a file location provided to me which I need to process the files found in the individual sub directories.

For eg: C:\Files\1\2\3\4

The sub directories limits to 4 and the file can reside …

741 views

Helo,

i am looking for a REGEX that can split a string like this
(CODE)


into
(CODE)

223 views

Hello,

i have this regular expression that i am trying to pull additional data for the lien subtotal in my string of text.

TEXT
(CODE)

REGEX

(CODE)

225 views

Need to capture url links from a string.

I am successfully able to filter out using this

"https://www.ANYURL.com/.*?(&)

I am looking to separate them but they are coming in separated by …

1142 views

Using VBscript & RegEx, how can I match lines starting with Oracle word in the below sample:

"OracleJobScheduler"                                check      12            TEST
"OracleMTSRecoveryService"                  check      87            Down
"Oracle…

1759 views
Courses: Start Training Online With Pros, Today
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Hi, if I know most of a url but just need help telling it to get everything until it sees the extension, how can I do that?

For instance, I would want to retrieve any urls that start with …

223 views

I need a regular expression that will check the first 3 positions of a column for numeric values.  For example;

ALT1
-------
300BES          --> Want this one.
ABC                
1Bliss      …

123 views

Hi,

How can I use Tsql to split a string in to multiple rows.  The number of delimiters in each string  is not fixed,  so the result will also contains different number of rows.

for example,

784 views

How do I remove everything except for the first set of numbers with Regex Pregmatch in PHP?  

2122-R|Replacement                            (Need result as 2122)                        
2039 CPC …

329 views

I had this question after viewing Following on from last question about extracting data values from a variable …

224 views

I had this question after viewing Extract a value from a variable using regular expression …

323 views

Yes, it has to be a regular expression!

I have a variable which might contain some data such as the following:-

                 Anthony J. Horner
                    12 the high st., Newcastle
                    123123123
       …

431 views

I need to use REReplaceNoCase to replace some variable

What I have is this http://www.test.com/21-102-792/p/21-102-792&catalog=1

What I need is this @@@21-102-792&catalog=1

So I Need to …

132 views

Hi,

My "While condition" is located near the bottom of this script. I'm trying to eliminate several characters by a specific identity from the front of strings in a flat file database.

I tried …

546 views
Live: Real-Time Solutions, Start Here
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Hi,

I have this php regex to validate url, this is working fine but it's allows
these formats that I want to prevent ww.test.org and w.test.org

So is this possible to catch these cases  with or…

337 views

Good morning... I'm fairly new to regular expressions and am trying to edit code that another developer built to accommodate some new text.  The way that the text is being saved in our new process is …

726 views

I'm working in Classic ASP and need to filter out all characters other than (allow):
1. Numerical
2. Alphabetic (any language, greek latin german etc)
3. Others:   space  -  .  @  +

What's the …

852 views

I'm looking with JavaScript to validate US-based phone numbers with hyphens. The required format is 333-444-5555. The first digit must be 2 or greater; the others can be anything from 0-9.

The …

343 views

Hello, Maybe I'm confused; it is my understanding that this is a regular expression /[^]*\/\*([^]*
The \ is used to escape the right adjacent character hence I would think that there would be a \ at …

272 views

What regular expression do I need if I want to make sure that the user enters a value from 1-100 (with or without a 0)  + two digits?

I tried the following but it doesn't seem to be right:

My …

1543 views
Show more content
201506-LO-Top-001

TOP EXPERTS

view all

RELATED TOPICS view all topics

  1. PHP
    (117,724)
  2. C#
    (91,483)
  3. Perl
    (25,977)
  4. .NET Programming
    (131,929)
  5. JavaScript
    (119,376)
  6. ASP.NET
    (123,351)
  7. Programming
    (52,030)
  8. Visual Basic.NET
    (92,126)
  9. Java
    (98,868)
  10. Shell Scripting
    (9,842)