understanding a LTR function regex
Hey guys , have a look at the function
HERE .
I believe its to detect weather a character is left to right(LTR) or right to left (RTL).
- var ltrChars = 'A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02B8\u0300-\u0590\u0800-\u1FFF'+'\u2C00-\uFB1C\uFDFE-\uFE6F\uFEFD-\uFFFF',
- rtlChars = '\u0591-\u07FF\uFB1D-\uFDFD\uFE70-\uFEFC',
- rtlDirCheck = new RegExp('^[^'+ltrChars+']*['+rtlChars+']');
I am still confused whats the real purpose of this function , the other question i had was , i really wanted to know what the end regix looks like , so i console.logged
rtlDirCheck, like so:
- console.log( rtlDirCheck )
but i get all jumbled characters , how do i get the final end product regex , so that i can go and test it HERE .