I am trying to replace a non-ASCII character from a string with the following code:
string.gsub(194.chr,'')
When I do this, I get the following error:
RegexpError: premature end of regex: //
Can someone tell me how to do this?
>> string="foo\xC2bar" => "foo\xC2bar" >> string.force_encoding"ASCII-8BIT" => "foo\xC2bar" >> string.gsub(194.chr, '') => "foobar"
Source: https://habr.com/ru/post/1759463/More articles:python: httplib error: cannot send headers - pythonWhen I publish a WCF service to IIS, do the services not work? - restкак ссылаться на tools.jar из исполняемого банку - javaTesting on Android - androidchange the name of the first option - jqueryЧто означает ": P" в запросе JDO - javaFactory Girl created objects that do not clean between tests? - ruby-on-railsCheck if textarea has any characters (and ignore spaces) before sending - jqueryhttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1759467/can-i-open-multiple-connections-to-a-http-server&usg=ALkJrhgO660kDbeyVsqUXivjORsCJUEpQwДолжен ли я установить Imagmagick над gd - phpAll Articles