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 5998763
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T00:27:08+00:00 2026-05-23T00:27:08+00:00

I am doing a string parsing problem in PHP. I want a regular expression

  • 0

I am doing a string parsing problem in PHP. I want a regular expression for a word in a dictionary. The word can contain only A-Z and a-z. I came up with this regex but this seems to be not working. Can someone help.

$regexp = "/[A-z]+/";
if(preg_match($regexp,$buffer)){    
   print $buffer . "<BR>";
}

Adding rkt’s comment for eadibility

currently using this regex

$regexp = "/[A-Za-z]+/";

but still lot of irrelevant words are getting printed , for eg .

a.new,#quickbar a.new{color:#ba0000} enwiki:resourceloader:filter:minify-css:5:f2a9127573a22335c2a9102b208c73e7 wgNamespaceNumber=0;
wgAction="view";
wgPageName="Roger_Federer";
wgMainPageTitle="‌​Main Page";
wgWikimediaMobileUrl="http:\/\/en.m.wikipedia.org\/wiki";
document.writeln("\x3cdiv id=\"localNotice\"\x3e\x3cp\x3e\x3c/p\x3e\n\x3c/div\x3e");
  • 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-05-23T00:27:09+00:00Added an answer on May 23, 2026 at 12:27 am

    If you want to match a whole word only…

    /\b[A-Z]+\b/i
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm doing simple string input parsing and I am in need of a string
I want to convert a string into a double and after doing some math
I am having a problem passing a json string back to a php script
While doing the data/time parsing in c++ (converting a string in any format to
I'm having a problem parsing my parameters in ASP.Net Here's what i'm doing Sub
My understanding of symfony isn't stellar sometimes. I just came across this problem and
Is there any better alternative for doing string formatting in VC6, with syntax checking
When doing a string comparison in C#, what is the difference between doing a
What is the best way of doing case-insensitive string comparison in C++ without transforming
I've used strpbrk() occasionally while doing low-level string work in C, but I've never

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.