
150 Cal.App.3d 486 (1984)
198 Cal. Rptr. 61
THE PEOPLE, Petitioner,
v.
THE SUPERIOR COURT OF SANTA CLARA COUNTY, Respondent; DAVID PRICE, Real Party in Interest.
Docket No. A024169.
Court of Appeals of California, First District, Division Five.
January 5, 1984.
*487 COUNSEL
John K. Van de Kamp, Attorney General, Stan Helfman, Ann K. Jensen, Morris K. Lenk and Thomas A. Brady, Deputy Attorneys General, for Petitioner.
No appearance for Respondent.
Richard Such for Real Party in Interest.
OPINION
LOW, P.J.
Penal Code section 12022.1 provides that a defendant convicted of a felony committed while he was "released from custody on bail *488 or on his or her own recognizance pending trial on an earlier felony offense" shall be subject to sentence enhancement for the later felony if the earlier felony charge resulted in conviction.[1] Is an individual accused by felony complaint, but released on his own recognizance before preliminary examination, "pending trial" within the meaning of section 12022.1? We hold that he is.
David Price was accused of several felonies by an information which further alleged that at the time of commission of some of the offenses he was "out of custody on bail and on his own recognizance pending trial on" specified felonies. Proof at preliminary examination showed that at the time of the offense for which these enhancements are sought, Price had been at liberty on his own recognizance, charged with felonies by complaint while awaiting preliminary examination. The magistrate included the enhancements in his holding order. Price moved in respondent court to strike the enhancements on the ground that there had been "no evidence ... presented at the preliminary examination" that he had been out of custody on his own recognizance pending trial on felonies at the relevant times. (Cf. Pen. Code, § 995; People v. Superior Court (Mendella) (1983) 33 Cal.3d 754, 756-757 [191 Cal. Rptr. 1, 661 P.2d 1081].) Respondent court granted the motion. By petition for writ of mandate, the People seek review.
The only issue before us is the question of statutory construction. (1) We take into account basic principles: If no ambiguity, uncertainty, or doubt about the meaning of a statute appears, the provision is to be applied according to its terms without further judicial construction. (2) If, on the other hand, there is ambiguity, uncertainty, or doubt, the statutory language should be construed so as to effectuate the apparent legislative purpose. (3) In interpreting legislation, we must begin with the fundamental rule that a *489 court should ascertain the intent of the Legislature. (4) The court should seek to effectuate the intent of the law, acting in a reasonable fashion to give the statute a sensible construction in accordance with the purpose of the lawmakers, to promote rather than defeat the policy underlying the legislation. (5) We recognize that in the construction of penal statutes, we must give the benefit of any doubt to the criminal defendant. (In re Atiles (1983) 33 Cal.3d 805, 812 [191 Cal. Rptr. 452, 662 P.2d 910].)
(6) The clear meaning of section 12022.1, consistent with the obvious intent of the Legislature, is that any person who has been lawfully subjected to custody under charges filed either before a magistrate or in superior court is "pending trial." The purpose of section 12022.1 is to deter, by punishing, those persons released on bail or their own recognizance from committing new felonies while awaiting trial court judgment on the felony charge. To exempt individuals released by the magistrate before preliminary examination would frustrate the legislative plan and create distinctions among individuals accused of felonies based on the timing of their arraignment in superior court.
Price argues that the statutory language does not apply to a defendant released on bail or recognizance before preliminary examination or, alternatively, that there is at most a doubt which should be resolved in his favor. His highly technical argument is that a felony defendant cannot be said to be "pending trial" until he has been duly held to answer in the superior court, inasmuch as the magistrate before whom the felony complaint is pending has no trial jurisdiction. (Cf. People v. Case (1980) 105 Cal. App.3d 826, 834 [164 Cal. Rptr. 662]; Witkin, Cal. Criminal Procedure (1963) Proceedings Before Trial, § 97, pp. 97-98.) The argument is inconsistent with the purpose of section 12022.1.
Any person taken into custody on felony charges and released on bail or his own recognizance should reasonably conclude that he was "pending trial" in the sense relevant to the obvious purpose of section 12022.1. The distinction between a felony complaint and an indictment or information has significance for various technical purposes, but it is irrelevant to construction of the statute before us.
Let a peremptory writ of mandate issue directing respondent court to vacate its order striking enhancements from the information and to enter a new order denying defendant David Price's motion. The stay of proceedings *490 heretofore ordered herein shall be dissolved upon entry of respondent court's order.
King, J., and Haning, J., concurred.
NOTES
[1]  Penal Code section 12022.1, enacted effective January 1, 1983 (Stats. 1982, ch. 1551, § 2) reads as follows:

"Any person convicted of a felony offense which was committed while that person was released from custody on bail or on his or her own recognizance pending trial on an earlier felony offense shall, upon conviction of the later felony offense, be subject to a penalty enhancement as follows:
"(a) If the person is convicted of a felony for the earlier offense, is sentenced to state prison for the earlier offense, and is convicted of a felony for the later offense, any state prison sentence for the later offense shall be consecutive to the earlier sentence. In addition, the sentence for the later offense shall be enhanced by an additional term of two years.
"(b) If the person is convicted of a felony for the earlier offense, is granted probation for the earlier offense, and is convicted of a felony for the later offense, any state prison sentence for the later offense shall be enhanced by an additional term of two years.
"(c) If the earlier offense conviction is reversed on appeal, the enhancement shall be suspended pending retrial of that felony. Upon retrial and reconviction, the enhancement shall be reimposed. If the person is no longer in custody for the later offense upon reconviction of the earlier offense, the court may, at its discretion, reimpose the enhancement and order him or her recommitted to custody."
