Question: I have a sorted list of about 2500 unique keywords delimited with commas. Keywords are in English and can be of several words separated by spaces.
I need to search incrementally words input from an input tag.

```
/,a[^,]+(?=,)/gi  this returns all keywords starting with an "a" or whatever typed in input tag.

```

It works very well indeed, but it will return the leading comma as well.
 Demo <https://regex101.com/r/4zRV12/1/>

I know is easy to remove this comma afterwords from the matches, still wonder if there is a way to do it in one pass.
Here my Test page javascript

```
 function reg(p){
   patt=","+p+"[^,]+(?=,)";
   var regex= new RegExp(patt, "gi");
   var k = '';
   cnt=0;
   var res;
   while ((res = regex.exec(str)) !== null) {
   k=k + "<a href='#' onclick='fill(this.innerHTML)';>"+res[0]+"</a><br>";
   cnt++;
   }
   k=cnt+"<br>"+k;
   document.getElementById("kword").innerHTML = k;  
  }
 function fill(w){
  document.getElementById("searchTxt").value = w;
 }
 </script>

```

Answer: 
If the EBS volume is your boot volume and you are using Amazon Linux, then you simply need to:

* Modify the volume size (eg in the console)
* Reboot the instance

Code that runs at startup will automatically expand the partition to use the new space available.

If you do not wish to reboot the instance, follow the directions on [Extending a Linux File System after Resizing the Volume](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/recognize-expanded-volume-linux.html). These instructions do not list the need to unmount/reattach the volume.
[![enter image description here](https://i.stack.imgur.com/U0Nam.png)](https://i.stack.imgur.com/U0Nam.png)

[![enter image description here](https://i.stack.imgur.com/IbKfs.png)](https://i.stack.imgur.com/IbKfs.png)

Now login through putty and follow the below mention steps -
------------------------------------------------------------

* ```
 1. mount -o size=10M,rw,nodev,nosuid -t tmpfs tmpfs /tmp 

```

2. lsblk
3. sudo file -s /dev/xvd\*
4. sudo growpart /dev/xvda 1
5. sudo resize2fs /dev/xvda1
6. df -h