Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8800567
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T00:37:27+00:00 2026-06-14T00:37:27+00:00

Are there any tools out there that will build a generic regular expression for

  • 0

Are there any tools out there that will build a generic regular expression for me if it’s given a specific string as input?

At the moment I”ll settle for an actual regex instead of a tool.

Note that in my case I can use HOST in angle brackets to represent the IP address in the regex. My goal is to build a regex for the tool called “fail2ban”.

Lets say my string is
[2012-11-06 22:52:40] NOTICE[4339] chan_sip.c: Registration from ‘”202″‘ failed for ‘111.111.11.1:9546’ – Wrong password

(It looks like this forum is apparently stripping out symbols and/or otherwise messing with my string so I’ll use the following conventions so you can see what it’s supposed to say:
DQ to represent a DOUBLE QUOTE ”
LAB to represent a LEFT ANGLE BRACKET <
RAB to represent a RIGHT ANGLE BRACKET >
AT to represent an at sign @
)

Using the above conventions:

[2012-11-06 22:52:40] NOTICE[4339] chan_sip.c: Registration from ‘DQ 202 DQ LAB sip:202 AT emailAddress RAB’ failed for ‘111.111.11.1:9546’ – Wrong password

Note that I have added spaces between symbols to increase readability. They are not part of the original string.

I have tried NOTICE.* .: Registration from ‘.‘ failed for ‘:.*’ – Wrong password

and:
NOTICE.* .: Registration from ‘\”.\”‘ failed for ‘:.*’ – Wrong password

What is the proper regex please?

Thank you in advance

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Sidenote: If none already exist, it sure would be nice if someone could build a tool to automate building a regular expression given a particular string.

Here’s what I’m thinking.

The string could be easily parsed by the following C library functions isalphanum(c), isalpha(c), isdigit(c), ispunct(c), isspace(c).

The hard part is building a regular expression generator.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T00:37:28+00:00Added an answer on June 14, 2026 at 12:37 am

    Try

    NOTICE.+: Registration from '.+' failed for '.+' - Wrong password

    The tool I used to flesh that out was RegExr.

    EDIT:

    I Googled for “regex generator” and came across this result. That is probably what you are looking for (self: adds link to bookmarks)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Are there any automated tools that will parse through XAML code and clean out
I know we have ILdasm, but is there any tool out there that will
Are there any tools out there that can convert my dpi units for a
Are there any tools/ ant tasks that could be integrated into the ant build
Just a quick one about installing a PHP website, are there any tools out
Does anyone know of any tests apps out there (or even libraries that can
Hi is there any tool to find out the execution time of a method?
Are there any scripts out there, or have any of you built a tool,
Are there any tools for UI screen design for mobile devices or Is most
Is there any tools or utilities to help in debugging ASP.NET MVC Routing issues?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.