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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T09:56:20+00:00 2026-06-01T09:56:20+00:00

<?php echo $form->create(); ?> <?php echo $form->hidden(‘id’); ?> <?php echo $form->input(‘name’)); ?> <?php echo

  • 0
<?php echo $form->create(); ?> 
   <?php echo $form->hidden('id'); ?> 
   <?php echo $form->input('name')); ?> 
   <?php echo $form->submit('Save'); ?> 
<?php echo $form->end(); ?>   

I want to replace “; ?” with ” ?”.

I used the vi command “:%s/; \?/ \?/g” to do that. I got the following output

<?php echo $form->create() ??> 
   <?php echo $form->hidden('id') ??> 
   <?php echo $form->input('name')) ??> 
   <?php echo $form->submit('Save') ??> 
<?php echo $form->end() ??> 

Actually, I need the following output.

<?php echo $form->create() ?>
   <?php echo $form->hidden('id') ?>
   <?php echo $form->input('name')) ?>
   <?php echo $form->submit('Save') ?>
<?php echo $form->end() ?>

Can you give the explanation for this strange behavior?

  • 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-01T09:56:21+00:00Added an answer on June 1, 2026 at 9:56 am

    The \? is the vi-regular-expression for the normal ? in other program’s regular expressions.

    You can look at :h regex to verify this (or more precisely :h E61).

    So when using ; \? you match ; (no space) and ;<space> (one space). From these matches the greediest one (see E61 – as many as possible) will be replaced with a ? thus resulting in two question-marks (one new one and the old one) when there is a space present.

    The correct expression would be: s/; ?/ ?/g

    EDIT: Fixed explanation to be more precise.

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

Sidebar

Related Questions

<?php echo $_POST['ss'];?> <form action=<?php echo $_SERVER['PHP_SELF'];?> method=post> <input name=ss type=text /> <input type=submit
A string looks like this: <form id=unban method=post action=unban.php?uid=<? echo $uID; ?>> <input type=hidden
my view: <form action=<?=base_url()?>index.php/frontend/main_con/temp> <input type=text name=temp> <input type=submit/> </form> Controller: function temp(){ echo
HTML <form action='insert.php' method='POST'> <p><b>Client:</b><input type='text' name='idclient'/> <p><b>Total:</b><br /><input type='text' name='total'/> <p><input type='submit' value='Save'
I have the following form in cakephp: <div class=quickcontactDisplay> <?php echo $form->create('Enquiry',array('action'=>'add','class'=>'quickcontact')); echo $form->hidden('visitor_id',
I have the following code for my login view: <?php echo $session->flash('auth'); echo $this->Form->create('User',
I am using cakephp and creating a form <?php echo $form->create('User', array('action' => 'cancel'));?>
echo $this->Form->create('Comment', array('url'=>array('controller' => 'comments', 'action' =>'add', $listposts['Post']['id']) ) ); echo $this->Form->input('post_id',array('type'=>'hidden','style'=>'width:30%','value'=>$listposts['Post']['id'])); echo $this->Form->input('name',array('style'=>'width:30%'));
this is my HTML: <?php echo form_open(base_url().'admin'); ?> <div class=row username> <span class=icon></span> <input
Imagine this simple form <form action=<?php echo $_SERVER['REQUEST_URI']; ?> method=post> <fieldset> <legend>Contact Me</legend> <label

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.