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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T07:20:45+00:00 2026-05-11T07:20:45+00:00

I need a regular expression that matches APA format references. I currently have this:

  • 0

I need a regular expression that matches APA format references.

I currently have this:

/([A-Z][a-zA-Z\-\:\'\s\´]{3,}\, ([a-zA-Z]\.[\s|,|.]| &?){1,}){1,}\(\d\d\d\d(, [A-Z][a-z\- ]*\d\d?|)\)\.[a-zA-Z\-\:\'\s]{3,}\.[a-zA-Z\-\s]+\,[ ]*\d\d(\(\S\))*,\d+.\d+./ 

It only catches 10 and is fragile as hell.

I only need journal articles – not books, not non-english articles.

Any tips on how to make this regex more manageable appreciated.

I built it using Rubular

This is the source data ( I know about the missing spaces and international character issues ):

Bre´dart, S., Valentine, T., Calder, A., & Gassi, L. (1995). An interactiveactivation model of face naming.Quarterly Journal of ExperimentalPsychology, 48(A),466–486.Bruce, V., & Young, A. (1986). Understanding face recognition.BritishJournal of Psychology, 77,305–327.Burton, A. M., & Bruce, V. (1992). I recognize your face but I can’tremember your name: A simple explanation?British Journal of Psy-chology, 83,45–60.Flude, B., Ellis, A., & Kay, J. (1990). Face processing and name retrievalin an anomic aphasic: Names are stored separately from semanticinformation about people.Brain and Cognition, 11,60–72.Gratton, G., Coles, M. G. H., Sirevaag, E. J., Eriksen, C. W., & Donchin,E. (1988). Pre- and poststimulus activation of response channels: Apsychophysiological analysis.Journal of Experimental Psychology: Hu-man Perception and Performance, 14,331–344.Hodges, J. R., & Greene, J. D. W. (1998). Knowing about people andnaming them: Can Alzheimer’s disease patients do one without theother?Quarterly Journal of Experimental Psychology, 51(A),121–134.Huynh, H., & Feldt, L. S. (1976). Estimation of the box correction fordegrees of freedom from sample data in the randomized block andsplit-plot designs.Journal of Educational Statistics, 1,69–82.Jasper, H. H. (1958). Report of the committee on methods of clinicalexamination in electroencephalography.Electroencephalography andClinical Neurophysiology, 10,370–375.Johnston, R. A., & Bruce, V. (1990). Lost properties? Retrieval differencesbetween name codes and semantic codes for familiar people.Psycho-logical Research 52,62–67.Kornhuber, H. H., & Deecke, L. (1965). Hirnpotentialaenderungen beiWillkuerbewegungen und passiven Bewegungen des Menschen: Be-reitschaftspotential und reafferente Potentiale [Brain potential changesfor voluntary and passive movements in humans: Readiness potentialand afferent potentials].Pfluegers Archiv fuer die Gesamte Physiologie,284,1–17.Kutas, M., & Donchin, E. (1974, November 8). Studies of squeezing:Handedness, responding hand, response force, and asymmetry of readi-ness potential.Science, 186,545–547.Kutas, M., & Donchin, E. (1980). Preparation to respond as manifested bymovement-related brain potentials.Brain Research, 202,95–115

Examples of book references that mess up mletterle’s answer

Lippold, O. C. J. (1967). Electromyography. In P. H. Venables & I. Martin (Eds.), A manual of psychophysiological methods (pp. 245–298). Amsterdam: North-Holland. Low, K. A., & Miller, J. (1999). The usefulness of partial information: Effects of go probability in the choice/nogo task. Psychophysiology, 36, 288–297. 
  • 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. 2026-05-11T07:20:46+00:00Added an answer on May 11, 2026 at 7:20 am

    This regex should do what you want

    ([^\.].*?[0-9])(?=\.|\Z) 

    It uses positive look ahead to check for numbers followed by a period (or the end of the string), it excludes the periods from the captures. You can see the result here: http://www.rubular.com/regexes/6293

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

Sidebar

Ask A Question

Stats

  • Questions 61k
  • Answers 61k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer This is very situation dependent. In your situation, if it… May 11, 2026 at 9:51 am
  • added an answer With the exception of the already mentionned TR1 shared_ptr, there… May 11, 2026 at 9:51 am
  • added an answer Just click on the solution in the Solution Explorer and… May 11, 2026 at 9:51 am

Related Questions

In my Python application, I need to write a regular expression that matches a
I need to write a regular expression that finds javascript files that match <anypath><slash>js<slash><anything>.js
I need a regular expression pattern to only accept positive whole numbers. It can
i need a Regular Expression to convert a a string to a link.i wrote
I need a regular expression to select all the text between two outer brackets.
I need a Perl regular expression to match a string. I'm assuming only double-quoted
I need to match and remove all tags using a regular expression in Perl.
I need to substitute the value of a string into my regular expression in
I need a C# profiler. Although I'm not averse to paying for one, something
I need a database that could be stored network drive and would allow multiple

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.