Skip to content

Instantly share code, notes, and snippets.

@r17x
Last active April 21, 2018 17:49
Show Gist options
  • Save r17x/012f6291885d820e3b1bf11d50d6c86b to your computer and use it in GitHub Desktop.
Save r17x/012f6291885d820e3b1bf11d50d6c86b to your computer and use it in GitHub Desktop.
# https://regex101.com/r/AsjSye/5
# regex : (<select.*class\s*=\s*\".*)(required span12)(.*\"\s*>)
# Find Text : <select class="required span12"> change to <select class="chosen-select required span12">
# why use ? if you have 1000 Files and want to change it
# Change with ack + perl -pi -E 
$ ack -l  "(<select.*class\s*=\s*\".*)(required span12)(.*\"\s*>)" | xargs perl -pi -E "s/(<select.*class\s*=\s*\".*)(required span12)(.*\"\s*>)/\$1chosen-select required span12\$3/g" 

Thanks To : @dev-makassar @yusrideb

@yusrideb
Copy link

Canggih memang 🥇

@r17x
Copy link
Author

r17x commented Apr 21, 2018

halo om @yusrideb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment