Comments (10)
Preserving multiple lines is complicated. Is a single line result OK?
Like this
張世平【チョウセイヘイ】「にんげん?食い止めるんだ!」
from textractor.
In the regex file you have to put the carriage return as written here, between $3 and $1
|REGEX|(([^」]|\n)+」)((.|\n)+)|BECOMES|$3
$1|MODIFIER||END|
from textractor.
Thank you!
I want to apply it in JavaScript,
is it like this?
const regex = /(([^」]|\n)+」)((.|\n)+)/;
const input = 'YourInputStringHere';
const result = input.replace(regex, (match, group1, group2, group3) => {
return group3;
});
console.log(result);
from textractor.
I don't know, but surely in the return you must also add group1 in addition to group3
If you want to keep the carriage return 'maybe' like this
return group3+'\n'+group1;
from textractor.
Then, is it right if I write it like this?
|REGEX|(([^」]|\n)+」)((.|\n)+)|BECOMES|$3\r$1
$1|MODIFIER||END|
from textractor.
No, this
---start here
|REGEX|(([^」]|\n)+」)((.|\n)+)|BECOMES|$3
$1|MODIFIER||END|
---end here
from textractor.
Thank you!
However, test results are same,,
results :
「わかった。すぐに向かうわ」
関羽
from textractor.
Thank you! However, test results are strange,,Maybe my JavaScript is the problem
results :
onEnter
onEnter: 0
「関羽……」
onEnter
onEnter: 0
劉備【リュウビ】
「関羽……」
劉備【リュウビ】
JavaScript
const regexPattern = /(([^」\n]+)」)((.|[\n])+)/g;
let match;
while ((match = regexPattern.exec(s)) !== null) {
const modifiedString = match[3] + match[1];
s = s.replace(match[0], modifiedString);
}
console.log(s);
from textractor.
maybe like this
s.replace(/(([^」]|\n)+」)((.|\n)+)/g, '$3\n$1');
from textractor.
Thank you for your efforts!!
from textractor.
Related Issues (20)
- Can't find hook for Dasaku (if its important)need help HOT 1
- haven't been able to get boku no natsuyasumi on duckstation to work HOT 1
- Need help hooking for VN (Seifuku Kanojo) HOT 1
- devtool HOT 1
- Something wrong with DeepL Devtool?
- Need help hooking for VN (Haruki no Saidai no Teki wa Risei.) HOT 1
- Translate VN Mono HOT 10
- It doesn't find and translate the text of this game "amakano second season" HOT 6
- Widget for gamebar
- Error when translating HOT 2
- Textrator doesn't find the text for マニアックサークル白書 ~変態淑女たちの物語~ HOT 1
- No text extracted: BHA HOT 3
- No text or dialog hooks for [TinkerBell] Mujina | ムジナ HOT 5
- Sword and Fairy 3 (2003) HOT 1
- help finding better hook for (RJ01164204) 借金地獄の俺が言いなり家出JKを拾った
- Textractor showing symbols instead of Japanese characters HOT 6
- sayonara o oshiete HOT 6
- italicized words in Textractor HOT 4
- Textractor: Insert hook: JavaScript ← What should I do??? HOT 7
- Device or resource busy HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from textractor.